property inference

Tech-Archive recommends: Fix windows errors by optimizing your registry



hey all,

given:

class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public override string ToString()
{
return this.FirstName + " " + this.LastName;
}
}

question:
so, if you do this type of inference there's no access to the private
variable? is that correct?

thanks,
rodchar
.



Relevant Pages

  • Re: property inference
    ... public string FirstName ... public override string ToString() ... if you do this type of inference there's no access to the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Databinding to a combo box: Newbie
    ... Override the ToString function to return the 'look' that you want the ... The combobox will display the ToString output but the Selected item ... public struct stTuple ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ToString Debug vs Display strategies & preferences
    ... IFormattable implementation as well as ToString() override. ... public string FirstName ... public string ToString(string fmt, IFormatProvider fp) ... How about generalized debugging ToString stratagies? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DirectorySearcher.FindAll() causes Unspecified Error in C# but not in VB.NET
    ... >public string getEmail ... which you try to cast by calling .ToString- but you're calling that ... can't just call a .ToString() on either. ... VB.NET probably shields you from those programming errors by some ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: this.toString
    ... > I am a java beginner. ... > keyword makes an implicit call to Objects toString method as in the ... could have picked public String converThisObjectToAString() but I guess they ...
    (comp.lang.java.programmer)