C#.Net Codes

C# Program for Foreach loop and Sorted function

  using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 {     class Program     {         static void Main()        

C#.Net Codes

C# program for Nested For Loop

  using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 {     class Program     {         static void Main()        

C#.Net Codes

C# Program for Function of Array (Simple Example)

using System; class Program { static void Main(string[] args) { string[] strArray = { “str1”, “str2”, “str3”, “str4”, “str5” };//Array index {0},{1} {2} {3} {4} int lower = strArray.GetLowerBound(0);//we get

C#.Net Codes

C# Program for For Loop

using System; namespace Forloop{  class Program   {     static void Main(string[] args)      {        int no, i,result;        Console.Write(“Enter a numbert”);        no= Convert.ToInt32(Console.ReadLine());         for (i = 1; i <= 10; i++)         {      

C#.Net Codes

C# program of Fibonacci series to find the nth number

using System; namespace Fibonaccinumber {     class Program     {         static void Main(string[] args)         {             int a=0;     // assigning initaial value

C#.Net Codes

Palindrome Program in c#.net

using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace Palindrome { class Program { static void Main(string[] args) { string str = string.Empty; Console.WriteLine(“Enter a String”); string s = Console.ReadLine(); int

C#.Net Codes

Hello World! program in C#

// A Hello World! program in C#.  using System; namespace FirstProgram { class Hello { static void Main() { Console.WriteLine(“Hello World!”); Console.ReadLine(); } } }