hi there...
the compiler is right.. you have an stack overflow because you are using the property in a bad way... if you don't store the value of the property in a variable, there will be eternal calls to the property...
Code:
public string username
{
get
{
return username;
}
set
{
username = value;
}
}
this is your property..
username is the name of the property.. and also is where you are storing the new value.. since they have the same name, when you pass a value to username something like this happens..
username get's a value, username call username get property to store it, username get's a value, username call itself (again) get property to store it, and again and again...
you have to store the value in another variable... something like this...
Code:
private string username
public string Username
{
get
{
return username;
}
set
{
username = value;
}
}
remember that C# is case sensitive...
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========