Posts

Showing posts from December, 2016

Entity Frame work

Image
https://www.youtube.com/watch?v=DUGtcWNlrv8&t=26s

Integer to find the first and second maximum in array in c# using Sort Function

            Array Sort using sort function             int [] numbers = { 6, 3, 37, 12, 46, 5, 64, 21 };             Array.Sort(numbers);             Console.WriteLine("Largest Number: " + numbers[numbers.Length - 1]);             Console.WriteLine("Second Largest Number: " + numbers[numbers.Length - 2]);             Console.ReadKey();

Integer to find the first and second maximum in array in c#

          Maximum in array in c# (console application)                   int [] numbers = { 6, 3, 37, 12, 46, 5, 64, 21 };             int highest = 0;             int second_highest = 0;             foreach (int n in numbers)             {                 if(highest<n)                 {                     highest = second_highest;                     highest = n;                 }                                                 else if(secon...

String split equal parts and reverse the string in c#

          C# Console Application:             string name;             name = Console.ReadLine();//string             int mid = name.Length / 2; //get the middle of the String             String[] parts = { name.Substring(0, mid), name.Substring(mid) };             string reverse = new string(parts[0].Reverse().ToArray());             string reverse2 = new string(parts[1].Reverse().ToArray());             Console.WriteLine(parts[0]); //first string             Console.WriteLine(parts[1]); //second string             Console.WriteLine(reverse);//frist reverse string             Console.WriteLine(reverse2);//second reverse string        ...