I'm trying to convert an object array of my class to a string array.
In this example I have two classes. In one of my classes I want to creat two variables, objects of the other class. On variable will be a array and the other a "regular" variable.
Two classes name. ShowResult and Game.
In the Game class I write:
private ShowResult[] _showResults;
private ShowResult _showResult;
In my properties in my Game class I try to convert this two variables to string array and string:
public string[] ShowResults
{
get { return _showResults.ToString().ToArray(); }
set { _showResults.ToString().ToArray() = value; }
}
public string ShowResult
{
get { return _showResult.ToString(); }
set { _showResult = value; }
}
This doesn't work. I really want my custom object to be converted to string array and to string. But I get an error.. I know I can, but I don't know just how..
If anyone has any suggestion I would be greatful. OBS, this is just an example. But still I don't get why it wont work..?
By the way, sorry for my bad english. ;)
Best regards
ShowResult? You will need to use that in your property setter.