consulo-csharp icon indicating copy to clipboard operation
consulo-csharp copied to clipboard

CS0136

Open VISTALL opened this issue 8 years ago • 1 comments

#pragma warning disable 219

using System;

namespace test {
	public class DefaultTest {
		public static void aA(string d = default(string)) {
			string[] a = null;

			foreach (string s in a)
			{
				if (true)
				{
					//int pos = 1;  // error here

					Action action = () => {

						int pos = 2; // error here
					};
				}
			}

			int pos = 2;
		}
	}
}

VISTALL avatar Nov 07 '17 11:11 VISTALL

foreach variable not global for each statements

bug

VISTALL avatar Nov 12 '17 17:11 VISTALL