G
Guest
Hi ALL,
I am a very new to .NET.
When I want to create a setter or getter.
It is normally wrote :
public type Name{
get{
return defination;
}
set{
defination = value;
}
}
but if I this class holds a Collection,
I want to get some item by parameter, let me say:
public Type getItem(string byName);
public Type getItem(int byIndex);
How to write like setter and getter.
Thanks
I am a very new to .NET.
When I want to create a setter or getter.
It is normally wrote :
public type Name{
get{
return defination;
}
set{
defination = value;
}
}
but if I this class holds a Collection,
I want to get some item by parameter, let me say:
public Type getItem(string byName);
public Type getItem(int byIndex);
How to write like setter and getter.
Thanks