Could anyone please explain the meaning \"this\" in C#?
Such as:
// complex.cs using System; public struct Complex { public int real; public
this is a variable which represents the current instance of a class. For example
class SampleClass { public SampleClass(someclass obj) { obj.sample = this; } }
In this example, this is used to set the "sample" property on someclass obj, to the current instance of SampleClass.