Skip to content

Instantly share code, notes, and snippets.

@psurikov
Created September 5, 2011 16:23
Show Gist options
  • Save psurikov/1195381 to your computer and use it in GitHub Desktop.
Save psurikov/1195381 to your computer and use it in GitHub Desktop.
public class Wrapper
{
public Wrapper(string value)
{
_value = value;
}
private string _value;
}
public class Test
{
private string someString = "Some string";
private Wrapper wrapper = new Wrapper(someString); // cannot access non-static field 'someString' in static context
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment