I am new to asp.net & trying create a object, but there is a syntax error
public class pair
{
private string key;
private string value;
public pair(string key, string value)
{
this.key = this.setKey(key);
this.value = this.setValue(value);
}
private void setKey (string key) {
this.key = key;
}
public string getKey()
{
return this.key;
}
private void setValue(string value)
{
this.value = value;
}
public string getValue()
{
return this.value;
}
}
these two lines
this.key = this.setKey(key);
this.value = this.setValue(value);
have something wrong, anyone know the problems?
You just need two properties here or just use