Prev: When to use ThreadPool
Next: using the ThreadPool
From: Rick on 14 May 2010 16:34 How do I create an array like the following which contains string and integer? string[,] siblings = { {"Mike", 28}, {"Mary", 25}, {"John", 31} };
From: Jason Newell on 14 May 2010 16:41 object[,] siblings = { { "Mike", 28 }, { "Mary", 25 }, { "John", 31 } }; Jason Newell www.jasonnewell.net Rick wrote: > How do I create an array like the following which contains string and integer? > > string[,] siblings = { {"Mike", 28}, {"Mary", 25}, {"John", 31} }; > > >
From: Rick on 14 May 2010 18:00 thanks "Jason Newell" wrote: > object[,] siblings = { { "Mike", 28 }, { "Mary", 25 }, { "John", 31 } }; > > Jason Newell > www.jasonnewell.net > > Rick wrote: > > How do I create an array like the following which contains string and integer? > > > > string[,] siblings = { {"Mike", 28}, {"Mary", 25}, {"John", 31} }; > > > > > > > . >
From: Arne Vajhøj on 14 May 2010 18:37 On 14-05-2010 16:34, Rick wrote: > How do I create an array like the following which contains string and integer? > > string[,] siblings = { {"Mike", 28}, {"Mary", 25}, {"John", 31} }; Jason already showed you how to use object[,]. And it works. But I will strongly recommend that you use X[] where X is a class with a string and an int property instead. It is a lot more type safe. Arne
From: Rick on 17 May 2010 11:21
Arnie, Could you please provide me a sample code? "Arne Vajhøj" wrote: > On 14-05-2010 16:34, Rick wrote: > > How do I create an array like the following which contains string and integer? > > > > string[,] siblings = { {"Mike", 28}, {"Mary", 25}, {"John", 31} }; > > Jason already showed you how to use object[,]. > > And it works. > > But I will strongly recommend that you use X[] where X is > a class with a string and an int property instead. It is > a lot more type safe. > > Arne > . > |