summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0165-11.cs
blob: b9b7ba180c8e14c0500098d111580e7204de3140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// CS0165: Use of unassigned local variable `fb'
// Line: 17

using System.Collections;

public class EntryPoint
{
	public static void Main ()
	{
		ArrayList fields = new ArrayList ();

		Field fb;
		while (fields.Count > 0) {
			fb = (Field) fields[0];
		}

		if (fb.Name != "b") {
			System.Console.WriteLine ("shouldn't compile here.");
		}
	}

	public class Field
	{
		public string Name;
	}
}