I am working on a project involving KeyValuePair. I have int as key, and string as Value.
What I want is I want to get the Value from KeyValuePair.
I have this code:
var list = new List<KeyValuePair<int, string>>()
{
new KeyValuePair<int, string>(obj,_Obj.Questions)
};
Dictionary<int, string> d = new Dictionary<int, string>
{
{ 1, "Welcome, How are you?" },
{ 2, "Tell me something about yourself."},
{ 3, "How much experience do you have?"},
};
So if you see the string Values in KVP like "Welcome, How are you?", "Tell me something about yourself" etc is a static one. All these values are already present in my local database. I want these string values from database only.
I am using MS SQL Database
Is this possible??