S
Steve Richter
KeyValuePair<string,string> has a ToString method that returns the
KeyValue pair seperated by a comma and enclosed in [ ]:
[ name, Jane ]
Is this method used as a building block for serialization?
The reason I ask is because I dont see a "FromString" or "Parse"
static method that takes a string as an argument and returns a
KeyValuePair<string,string> object.
also, the ToString resulting value does not look like it could be
parsed under all circumstances. If the value in the KeyValuePair
contains a comma the ToString method returns the value as is, without
enclosing it in quotes:
KeyValuePair<string,string> demo
= new KeyValuePair<string,string>( "First, Names", "Billy,
Jane" ) ;
MessageBox.Show(demo.ToString());
resulting string: [First, Names, Billy, Jane]
-Steve
KeyValue pair seperated by a comma and enclosed in [ ]:
[ name, Jane ]
Is this method used as a building block for serialization?
The reason I ask is because I dont see a "FromString" or "Parse"
static method that takes a string as an argument and returns a
KeyValuePair<string,string> object.
also, the ToString resulting value does not look like it could be
parsed under all circumstances. If the value in the KeyValuePair
contains a comma the ToString method returns the value as is, without
enclosing it in quotes:
KeyValuePair<string,string> demo
= new KeyValuePair<string,string>( "First, Names", "Billy,
Jane" ) ;
MessageBox.Show(demo.ToString());
resulting string: [First, Names, Billy, Jane]
-Steve