Dear All,
My requirement is need to pass many parameters with different types using methods in c#.
Get and and set the value of this method.
Like
Get(int a, string name ....................................)
Please recomnd me the best way to use ..
Regards,
Sarava
Loading

Jaish MathewsPosted May 3, 2010, 6:28 AM
Method
public void Test(ParameterCollection coll)
{
Console.WriteLine(coll["First"].DefaultValue);
Console.WriteLine(coll["Second"].DefaultValue);
}
Calling
ParameterCollection coll = new ParameterCollection();
coll.Add("First",System.Data.DbType.Int32,"100");
coll.Add("Second", System.Data.DbType.String, "Jaish Mathews");
Test(coll);
NB: In 2010 you can use Tuples. Look below article
http://www.c-sharpcorner.com/UploadFile/jaishmathews/993/Default.aspx?ArticleID=abfe8998-39d0-4c3e-b0b8-def9a86f2594