G
Guest
Hello,
Thanks for reviewing my question. I am trying to override the = operator
for my UserControl class; However, I am getting a syntax error.
public class MyClass
{
private int x = 0;
public static UserControl1 operator =(int y)
{
x= y;
return this;
}
}
My goal is to offer an assignment similar to this:
MyClass B;
b = 1;
Many Thanks
Peter
Thanks for reviewing my question. I am trying to override the = operator
for my UserControl class; However, I am getting a syntax error.
public class MyClass
{
private int x = 0;
public static UserControl1 operator =(int y)
{
x= y;
return this;
}
}
My goal is to offer an assignment similar to this:
MyClass B;
b = 1;
Many Thanks
Peter