N
Nik
I keep getting the following error 'member names cannot be
the same as their enclosing type' with the code below.
public class HelpText
{
private string _textToDisplay;
private string _cssClass;
public string TextToDisplay {
get {return _textToDisplay;}
set {_textToDisplay = value;}
}
public string CssClass {
get {return _cssClass;}
set {_cssClass = value;}
}
public string HelpText()
{
WebAuthorContext authorContext =
WebAuthorContext.Current();
//Check if in edit mode
if (authorContext.Mode ==
WebAuthorContextMode.AuthoringNew || authorContext.Mode ==
WebAuthorContextMode.AuthoringReedit) {
HelpText = "<span
class=\"" + CssClass + "\">" + TextToDisplay + "</span>";
}
} }
any ideas?
the same as their enclosing type' with the code below.
public class HelpText
{
private string _textToDisplay;
private string _cssClass;
public string TextToDisplay {
get {return _textToDisplay;}
set {_textToDisplay = value;}
}
public string CssClass {
get {return _cssClass;}
set {_cssClass = value;}
}
public string HelpText()
{
WebAuthorContext authorContext =
WebAuthorContext.Current();
//Check if in edit mode
if (authorContext.Mode ==
WebAuthorContextMode.AuthoringNew || authorContext.Mode ==
WebAuthorContextMode.AuthoringReedit) {
HelpText = "<span
class=\"" + CssClass + "\">" + TextToDisplay + "</span>";
}
} }
any ideas?