Queue q = new Queue(); q.Enqueue("Sachin"); q.Enqueue('A'); q.Enqueue(false); q.Enqueue(38); q.Enqueue(5.4);
IEnumerator e;
e = q.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerable e;
e = q.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = q.GetEnumerable();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = Queue.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = q.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
namespace CuriousTabConsoleApplication { class SampleProgram { static void Main(string[] args) { int[]arr = newint[]{ 1, 2, 3, 4, 5 }; fun(ref arr); } static void fun(ref int[] a) { for (int i = 0; i < a.Length; i++) { a[i] = a[i] * 5; Console.Write(a[ i ] + " "); } } } }
struct Emp { public String name; public int age; public Single sal; } Emp e = new Emp();
e.name = "Amol";
e.age = 25;
e.sal = 5500;
With e
{
.name = "Amol";
.age = 25;
.sal = 5500;
}
With emp e
{
.name = "Amol";
.age = 25;
.sal = 5500;
}
e -> name = "Amol";
e -> age = 25;
e -> sal = 5500;
name = "Amol";
age = 25;
sal = 5500;
e.name = "Amol";
e.age = 25;
e.sal = 5500;
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.