South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
List<string> lst_str_bob= new List<string>();
lst_str_bob.Add("bob1");
etc...
I can't wait for variable variable variable variables to come out next year.
I raise you some factory building factory factories
List<object> someList = new List<object> { "test", 1, 2.00, true };
foreach (object o in someList)
{
Console.WriteLine(o.GetType());
}
List<object> someList = new List<object> { "test", 1, 2.00, true };
foreach (object o in someList)
{
Console.WriteLine(o.GetType());
}
Variable variables are yesterday's news. I use variable variable variables and I can't wait for variable variable variable variables to come out next year.
.net framework 4 has expando objects which you create an object with your properties on the fly. maybe that can help you?
http://blogs.msdn.com/b/csharpfaq/a...c-in-c-4-0-introducing-the-expandoobject.aspx
From what I've read (never used it) dynamic is cool.
Has loads of applications for JavaScript & COM.
Variable variables are yesterday's news. I use variable variable variables and I can't wait for variable variable variable variables to come out next year.