<?xml version="1.0"?>
<ErrorDocumentation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorName>CS0165</ErrorName>
  <Examples>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 12
// Compiler options: -r:CS0165-51-lib.dll

using System;

class C&lt;T&gt; where T : class
{
	public static void Foo ()
	{
	    S&lt;T&gt; s;
	    Console.WriteLine (s);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `v'
// Line: 19

using System;

class X
{
	void Foo (out int value)
	{
		value = 1;
	}

	public static void Main ()
	{
		int v;
		X x = null;

		x?.Foo (out v);
		Console.WriteLine (v);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `g'
// Line: 10

public class A
{
	static bool Test7 ()
	{
		int f = 1;
		int g;
		return f &gt; 1 &amp;&amp; OutCall (out g) || g &gt; 1;
	}

	static bool OutCall (out int arg)
	{
		arg = 1;
		return false;
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `x'
// Line: 17

using System;

class Program
{
	static int Main ()
	{
		int foo = 9;
		int x;

		switch (foo) {
		case 1:
			x = 1;
			gotoTarget: 
			{
				Console.WriteLine (x);
			}
			break;
		default:
			{
				if (foo != 0) {
					goto gotoTarget;
				}

				break;
			}
		}

		return 1;
	}
}

</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 9

using System;

class Test {
	
	static void Main () {
		Action a = () =&gt; a();
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 14

class X
{
	public static void Main ()
	{
		int i = 3;
		switch (i) {
		case 1:
			float a = 7.0f;
			break;
		default:
			float b = a + 99.0f;
			break;
		}
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `eh'
// Line: 12

using System;

public class E
{
	public static void Main ()
	{
		EventHandler eh;
		eh = delegate {
			Console.WriteLine (eh);
		};
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 14

using System;

class Program
{
	public static void Main ()
	{
		string s;
		object o = null;
		while (o != null || string.IsNullOrEmpty (s = (string) o.ToString ())) {
			Console.WriteLine (s);
		}
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `x'
// Line: 21

using System;

class X
{
	static bool Foo (out int x)
	{
		x = 5;
		return false;
	}

	public static int Main ()
	{
		int x;
		try {
			throw new ApplicationException ();
		} catch when (Foo (out x)) {
			return 1;
		} catch when (x &gt; 0) {
			return 0;
		}
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 9

class C
{
	static void Main ()
	{
		int a;
		Foo (out a, a);
	}

	static void Foo (out int a, int b)
	{
		a = b;
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `x'
// Line: 16

class T {
	void fun (ref int a)
	{
		if (a == 3)
		a = 2;
	}

	void x ()
	{
		int x;

		if (System.Console.Read () == 1)
			x = 1;
		fun (ref x);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 9

class Program
{
	static void Main ()
	{
		S s;
		s.Test ();
	}
}

struct S
{
	public string pp;
	
	public void Test ()
	{
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `v'
// Line: 19

using System;

class X
{
	int this [int v] {
		get {
			return 1;
		}
		set {			
		}
	}

	public static void Main ()
	{
		int v;
		X x = null;

		var r = x?[v = 2];
		Console.WriteLine (v);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `errors'
// Line: 9

class T {
	static void Main ()
	{
		int errors;

		errors += 1;
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 9

class C {
	public static int test4 ()
	{
		int a;

		try {
			a = 3;
		} catch {
		}

		// CS0165
		return a;
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `y'
// Line: 12

class test
{
        static void Main(string[] args)
        {
                {
                        int x = 8;
                }
                string y;
                args[0] = y;    // use of unassigned variable y
        }
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 14

using System;

class Program
{
	public static void Main ()
	{
		int a;
		string s = "";

		if (!(s != "s" &amp;&amp; (a = 4) &gt; 3)) {
			Console.WriteLine (a);
		}
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `service'
// Line: 17
using System;

public class Foo
{
	static void Main (string[] args)
	{
		int service;

		int pos = 0;
		while (pos &lt; args.Length) {
			service = 1;
			break;
		}

		Console.WriteLine (service);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `v'
// Line: 52

struct Vector3
{
	int field1, field2, field3;
}

public class C
{
	void Update ()
	{
		int v1 = 0;
		int v2 = 0;
		int v3 = 0;
		int v4 = 0;
		int v5 = 0;
		int v6 = 0;
		int v7 = 0;
		int v8 = 0;
		int v9 = 0;
		int v10 = 0;
		int v11 = 0;
		int v12 = 0;
		int v13 = 0;
		int v14 = 0;
		int v15 = 0;
		int v16 = 0;
		int v17 = 0;
		int v18 = 0;
		int v19 = 0;
		int v20 = 0;
		int v21 = 0;
		int v22 = 0;
		int v23 = 0;
		int v24 = 0;
		int v25 = 0;
		int v26 = 0;
		int v27 = 0;        
		int v29;

		Vector3 v;
		while (v8 != 0) {
			v = new Vector3 ();
		}

		System.GC.KeepAlive (v);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `foo'
// Line: 17

class X
{
        static void Main ()
        {
                int foo;

                int i = 0;
                if (i == 1)
                        goto e;

                goto f;

        b:
                i += foo;

        c:
                goto b;

        e:
                foo = 5;

        f:
                goto c;
        }
}
</string>
    <string>// CS0165: Use of unassigned local variable `errors'
// Line: 9

class T
{
	static void Main ()
	{
		dynamic errors;
		errors.Call ();
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 9

using System;

class C {
	public static int test5 ()
	{
		int a;

		try {
			Console.WriteLine ("TRY");
			a = 8;
		} catch {
			a = 9;
		} finally {
			// CS0165
			Console.WriteLine (a);
		}

		return a;
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `u'
// Line: 15

class X
{
	public static void Main ()
	{
		int i = 0;
		int u;
		switch (i) {
			case 1:
				A1:
				goto case 2;
			case 2:
				i = u;
				goto case 3;
			case 3:
				goto case 4;
			case 4:
				goto A1;
		}
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `foo'
// Line: 17

struct Rectangle
{
	internal int x;
	public int X {
		set { }
	}
}

public class Foo
{
	public static void Main ()
	{
		Rectangle foo;
		foo.X = 5;
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `res'
// Line: 11

class X
{
	public static int Main ()
	{
		string[] a = null;
		int res;
		var m = a?[res = 3];
		System.Console.WriteLine (res);
		return 0;
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 16

using System;

class Program
{
	public static void Main ()
	{
		int a;
		string s = "";

		for (int i = 0; s != "s" &amp;&amp; (a = 4) &gt; 3; ++i) {
		}

		Console.WriteLine (a);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `res'
// Line: 23

class A
{
	public B b;
}

class B
{
	public void Foo (int arg)
	{
	}
}

class X
{
	public static void Main ()
	{
		A a = null;
		int res;
		a?.b.Foo(res = 3);
		System.Console.WriteLine (res);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `fb'
// Line: 15
using System.Collections;

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

    Field fb;
    for (int i = 0; i &lt; fields.Count; i++) {
      if (((Field) fields[i]).Name == "abc") {
        fb = (Field) fields[i];
	break;
      }
    }

    if (fb.Name != "b") {
    }
  }

  public class Field
  {
    public string Name;
  }
}

</string>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 12

class X
{
    static string Foo (object arg)
    {
        if (arg is string s) {

        }

        return s;
    }
}</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 17

class Test
{
	public static bool Foo (out int v)
	{
		v = 0;
		return false;
	}

	static void Main()
	{
		int a;
		bool b = false;

		if ((b &amp;&amp; Foo (out a)) || b) {
			System.Console.WriteLine (a);
		}
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `v'
// Line: 19

using System;

class X
{
	void Foo (out int value)
	{
		value = 1;
	}

	public static void Main ()
	{
		int v;
		X[] x = null;

		x?[0].Foo (out v);
		Console.WriteLine (v);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 16

using System;

public class Test
{
        public int i;

        public void Hoge ()
        {
                if (i &gt; 0)
                        goto Fuga;
                string s = "defined later";
        Fuga:
                Console.WriteLine (s);
        }
}
</string>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 10
// Compiler options: -r:CS0165-19-lib.dll

class Program
{
	static void Main ()
	{
		S s;
		s.Test ();
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 13

using System;

class Program
{
	public static void Main (string[] args)
	{
		int a, b;
		string s = "";
		var res = s != null ? a = 1 : b = 2;
		Console.WriteLine (a);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `retval'
// Line: 9

class Test
{
	static string DoStuff (string msg)
	{
		string retval;

		switch (msg) {
		case "hello":
			retval = "goodbye";
			return retval;
		case "goodbye":
			return retval;
		case "other":
			retval = "other";
		case "":
			return msg;
		}
		return "";
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `v'
// Line: 17

using System;

class C
{
	void Test (int arg)
	{
		int v;
		switch (arg) {
			case 1:
				v = 0;
				break;
		}

		Console.WriteLine (v);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `i'
// Line: 9

public class MainClass
{
	public void Foo ()
	{
		int i;
		i++;
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 14

using System;

class Program
{
	public static void Main ()
	{
		int a;
		string s = "";

		if (s != "s" &amp;&amp; (a = 4) &gt; 3) {
			return;
		}
		
		Console.WriteLine (a);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 11

using System.Linq;

class M
{
	public static void Main ()
	{
		int[] a;
		int m = a.FirstOrDefault&lt;int&gt; ();
	}
}
</string>
    <string>// Cs0165: Use of unassigned local variable `c'
// Line: 9

public class C
{
	public static void Main ()
	{
		C c;
		c.ToString ();
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `v'
// Line: 52

struct Vector3
{
	int field1, field2, field3;
}

public class C
{
	void Update ()
	{
		int v1 = 0;
		int v2 = 0;
		int v3 = 0;
		int v4 = 0;
		int v5 = 0;
		int v6 = 0;
		int v7 = 0;
		int v8 = 0;
		int v9 = 0;
		int v10 = 0;
		int v11 = 0;
		int v12 = 0;
		int v13 = 0;
		int v14 = 0;
		int v15 = 0;
		int v16 = 0;
		int v17 = 0;
		int v18 = 0;
		int v19 = 0;
		int v20 = 0;
		int v21 = 0;
		int v22 = 0;
		int v23 = 0;
		int v24 = 0;
		int v25 = 0;
		int v26 = 0;
		int v27 = 0;        
		int v29;

		Vector3 v;
		if (v1 == 0)
		{
			v = new Vector3 ();
		}
		else if (v2 &gt;= 0.5)
		{
			v = new Vector3 ();
		}

		System.GC.KeepAlive (v);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 14

using System;

class Program
{
	public static void Main ()
	{
		int a;
		string s = "";

		if (s != "s" || (a = 4) &gt; 3) {
			Console.WriteLine (a);
		}
	}
}
</string>
    <string>// 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 &gt; 0) {
			fb = (Field) fields[0];
		}

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

	public class Field
	{
		public string Name;
	}
}

</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 14

using System;

class Program
{
	public static void Main ()
	{
		int a;
		string s = "";

		var res = (s == "" &amp;&amp; (a = 4) &gt; 3) ? 1 : a;
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `trial'
// Line: 18

using System;

class Test
{
	public static void Main (string[] args)
	{
		bool trial;
		string action = "add_trial";

		switch (action) {
		case "add_trial":
			trial = true;
			goto case "add_to_project";
		case "add_to_project":
			Console.WriteLine (trial);
			break;
		case "test":
			break;
		}
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 14

using System;

class Program
{
	public static void Main ()
	{
		string s;
		object o = null;
		while (o != null &amp;&amp; string.IsNullOrEmpty (s = (string) o.ToString ())) {
		}
		
		Console.WriteLine (s);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 13

using System;
using System.Diagnostics;

class C
{
	static int Main ()
	{
		int a;
		Foo (a = 9);
		return a;
	}

	[Conditional ("MISSING")]
	static void Foo (int value)
	{
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `x'
// Line: 19

struct S
{
	public object O;
}

class X
{
	public S s;
}

class C
{
	public static void Main ()
	{
		X x;
		x.s.O = 2;
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 16

class Test
{
	public static bool Foo (out int v)
	{
		v = 0;
		return false;
	}

	static void Main()
	{
		int a;
		bool b = false;
		if ((b || Foo (out a)) &amp;&amp; b)
			return;
		else
			System.Console.WriteLine (a);
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `s'
// Line: 9

public class Test
{
        public static string Foo {
                get {
                        string s;
                        if (0 == 1 &amp;&amp; (s = "") == "a" || s == "")
                                return s;
                        return " ";
                }
        }
}</string>
    <string>// CS0165: Use of unassigned local variable `service'
// Line: 17
using System;

public class Foo
{
	static void Main ()
	{
		int service;

		foreach (char b in "hola") {
			Console.WriteLine (b);
			service = 1;
			break;
		}

		Console.WriteLine (service);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `j'
// Line: 10

class Test
{
	static void Main ()
	{
		int? i;
		int? j;
		int? x = (i = 7) ?? j;
    }
}</string>
    <string>// CS0165: Use of unassigned local variable `service'
// Line: 16
using System;

public class Foo
{
	static void Main (string[] args)
	{
		int service;

		for (int pos = 0; pos &lt; args.Length; pos++) {
			service = 1;
			break;
		}

		Console.WriteLine (service);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 14

using System;

class Program
{
	public static void Main ()
	{
		object a;
		string s = null;

		var res = s ?? (a = null);
		Console.WriteLine (a);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 14

class C
{
	static void Main ()
	{
		bool x = true, y = true, z = true;

		int a;
		if (x ? y : (z || Foo (out a)))
			System.Console.WriteLine (z);
		else
			System.Console.WriteLine (a);
	}

	static bool Foo (out int f)
	{
		f = 1;
		return true;
	}
}</string>
    <string>// CS0165: Use of unassigned local variable `t'
// Line: 8

public class Foo&lt;T&gt;
{
	public static bool Test ()
	{
		T t;
		return t is int;
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 16

using System;

class Program
{
	public static void Main ()
	{
		int a;
		string s = "";

		do {
		} while (s != "s" &amp;&amp; (a = 4) &gt; 3);

		Console.WriteLine (a);
	}
}
</string>
    <string>// CS0165: Use of unassigned local variable `a'
// Line: 13

using System;

class Program
{
	public static void Main ()
	{
		int a;
		string s = "";
		var res = s == null || ((a = 1) &gt; 0);
		Console.WriteLine (a);
	}
}
</string>
  </Examples>
</ErrorDocumentation>