R
Richard Dixson
In .NET with C# code is it possible to override an arrays ToString method
with my own implementation, without having to create a new array class that
derrives from array?
For example, say I have a basic array variable with elements like this:
green
blue
red
yellow
And I want to make it so that if you call ToString() on the array it will
return a string like this "green, blue, red, yellow". Is that possible
without making my own subclass? If so how would I go about this? A tiny
piece of code demonstrating how to do this if it is possible would be great.
Thanks.
Richard
with my own implementation, without having to create a new array class that
derrives from array?
For example, say I have a basic array variable with elements like this:
green
blue
red
yellow
And I want to make it so that if you call ToString() on the array it will
return a string like this "green, blue, red, yellow". Is that possible
without making my own subclass? If so how would I go about this? A tiny
piece of code demonstrating how to do this if it is possible would be great.
Thanks.
Richard