What do you mean by 'in' keyword in C#?

 Posted by Goud.Kv on 9/6/2014 | Category: C# Interview questions | Views: 2008 | Points: 40
Answer:

in is a reserved keyword of C# programming language. in is widely used with foreach loop.

Example,
foreach (char ch in "Hello")

{
Console.WriteLine(ch); // prints all characters
}
in keyword is also used for some query expressions. Ex: LINQ.


Asked In: Spotted While Learning | Alert Moderator 

Comments or Responses

Login to post response