Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a combobox which I listed colors as below;

C#
Type colorType = typeof(Colors);
PropertyInfo[] propInfoList =
    colorType.GetProperties(BindingFlags.Static | BindingFlags.DeclaredOnly | BindingFlags.Public);
foreach (PropertyInfo c in propInfoList)
{
    this.cmbColors.Items.Add(c.Name);
}


That is not my work , but I want to simplify my work as below;

Let's say my table columns: Name,Surname,Address ,Color(varchar).
I should take the color from combobox and insert into color column as string to database. Also I should be able to show the color in a window which comes from database with other colons.

How can I convert color type to string in Silverlight? I tried a few thing , but they did't work.
Thanks for the replies, in advance..
Posted
Updated 7-Feb-12 5:29am
v2

1 solution

ToString() will surely work ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900