Maha

Maha

  • NA
  • 0
  • 326.5k

Why not compiling

Sep 7 2013 10:43 PM
It is not compiling when data type in foreach is string. It is compiling when data type in foreach is char. Problem is highlighted.

using System;

class Program
{
static void Main(string[] args)
{
string checkStr = "Address";

foreach (string c in checkStr)
Console.Write(c);

Console.ReadKey();
}
}


Answers (2)