Files
mono/mcs/errors/cs0170.cs
T
Alejandro Sánchez Acosta c2b988119c Added cs0170 test error.
svn path=/trunk/mcs/; revision=9841
2002-12-23 12:54:57 +00:00

28 lines
313 B
C#

// CS0170: Use of possibly unassigned field `a'
// Line: 23
using System;
namespace cs0170
{
public struct Foo {
public int a;
}
public class Bar
{
public void Inc (int x)
{
++x;
}
static void Main ()
{
Foo f;
Bar b = new Bar();
b.Inc (f.a);
Console.WriteLine (f.a);
}
}
}