c# - assign string from list -
I've created a list with several options, we call a different color for each character. We now say that I want to code How can I get it? Note: Why not make a dictionary with the and after that: String A = "#FFB97FC 9"; String b = "#ff 9bcc 50"; // etc. String Answer 1 = Options. Answer 1; AnswerRectangle.Fill = GetColorFromHexa (answer1);
options.Answer1 = A .
answerCectangle
# FFB97FC 9
answer1 = # FFB97FC 9
glossary & lt; String, string & gt; Color = new dictionary & lt; String, string & gt; (); Colour. Add ("A", "# FFB 97F 9"); Colors.Add ("B", "# FF9BCC50");
answerRectangle.Fill = GetColorFromHexa (Color [answer1]);
Comments
Post a Comment