Posts

Showing posts from July, 2025

simple program C#

  This is a simple program C# using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 { class Program      { static void Main(string[] args)          { Console.WriteLine("Wel-Come to Aryan Computers, Barshi"); Console.ReadLine();          }      } }

use of concatenation string in C#

Image
  For Example: Write a program to demonstrate the use of concatenation string using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 { class Program     { static void Main(string[] args)         { string s1 = "Computers";   // ... Add another string to the start. string s2 = "Aryan" + s1; Console.WriteLine(s2); Console.ReadLine();         }     } } Output:

use of copy string in C#

Image
  For Example: Write a program to demonstrate the use of copy string using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication7 { class Program     { static void Main(string[] args)         { string s11 = "Aryan"; string s22 = string.Copy(s11); Console.WriteLine("Copy string is: {0}", s22); Console.ReadLine();         }     } } Output:

use of tuple in C#

Image
  For Example : Write a program to demonstrate the use of tuple. class Program     {         static void Main( string [] args)         {                                                      var t1= Tuple .Create(1, "Nintn" , "Patil" , "Barshi" );                 Console .WriteLine(t1);                 Console .ReadLine();                            }  ...

two dimension array in C#

Image
  For example: Write a program to demonstrate the use of two dimension array.    using System; using System.Collections.Generic; using System.Linq; using System.Text;   namespace ConsoleApplication6 { class Program     { static void Main(string[] args)         {   int i, j; //Declaring multi dimensional array int[,] a = new int[3, 2]; for (i = 0; i < 3; i++)             { for (j = 0; j < 2; j++)                 { Console.Write("Enter the Matrix(3X2): ");                     a[i, j] = Convert.ToInt32(Console.ReadLine());                 }     ...