<?xml version="1.0" encoding="us-ascii"?>
<ErrorDocumentation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorName>CS0162</ErrorName>
  <Examples>
    <string>// CS0162: Unreachable code detected
// Line: 11
// Compiler options: -warnaserror -warn:2

class Error
{
	void Test ()
	{
		switch (10)
		{
			case 9:
				break;
		}
	}

}
</string>
    <string>// cs0162.cs: Unreachable code detected
// Line: 18
// Compiler options: -warnaserror -warn:2

using System;

class C {
	public enum Flags {
		Removed	= 0,
		Public	= 1
	}

	public Flags	_enumFlags;
		
	internal void Close()
	{	
		if ((_enumFlags &amp; Flags.Removed) != 0)
			Console.WriteLine ("error");
	}
}
</string>
    <string>// cs0162.cs: Unreachable code detected
// Line: 18
// Compiler options: -warnaserror -warn:2

using System;

class C {
	public enum Flags {
		Removed	= 0,
		Public	= 1
	}

	public Flags	_enumFlags;
		
	internal void Close()
	{	
		if ((Flags.Removed &amp; _enumFlags) != (Flags.Removed &amp; _enumFlags))
			Console.WriteLine ("error");
	}
}
</string>
    <string>// cs0162.cs: Unreachable code detected
// Line: 13
// Compiler options: -warnaserror -warn:2

using System;

class C {
	bool T () { return true; }

	void Close()
	{	
		if (T () &amp;&amp; false)
			Console.WriteLine ("error");
	}
}

class XXXX { static void Main () {} }
</string>
    <string>// cs0162-5.cs: Unreachable code detected
// Line: 12
// Compiler options: -warnaserror

using System;

public class Driver
{
	public static void Main ()
	{
		int yyTop = 0;
		for (; ; ++yyTop) {
			if (yyTop &gt; 0)
				break;
			else
				return;
		}
	}
}

</string>
    <string>// cs0162-6.cs: Unreachable code detected
// Line: 9
// Compiler options: -warnaserror -warn:2

class Foo {
	static void Main ()
	{
		goto skip;
	a:
		throw new System.Exception ();
		goto a;
	skip:
		return;
	}
}
</string>
    <string>// cs0162-6.cs: Unreachable code detected
// Line: 9
// Compiler options: -warnaserror -warn:2

// this requires a multi-pass algorithm for unreachable code detection
// punting for now

class Foo {
	static void Main ()
	{
		goto skip;
	a:
		goto a;
	skip:
		return;
	}
}
</string>
    <string>// CS0162: Unreachable code detected
// Line: 9
// Compiler options: -warnaserror -warn:2

class C
{
	public static int Main ()
	{
		if (true == false)
			return 1;
		
		return 2;
	}
}</string>
    <string>// CS0162: Unreachable code detected
// Line: 9
// Compiler options: -warnaserror -warn:2

class Error
{
	void Test ()
	{
		if (1 == 0) {
			try {
			} catch (System.Net.Sockets.SocketException sex) {
				int x = (int)sex.SocketErrorCode;
			}
		}
	}

}</string>
    <string>// cs0162.cs: Unreachable code detected
// Line: 12
// Compiler options: -warnaserror -warn:2

using System;

class E
{
   public void Method (int i)
   {
       throw new ArgumentNullException ();
       Console.WriteLine ("Once upon a time..");
   }
}
</string>
  </Examples>
</ErrorDocumentation>