From: Jeff Johnson on
"Jackie" <Jackie(a)an.on> wrote in message
news:4bf5956c$0$22834$c3e8da3(a)news.astraweb.com...

> I think the sensible thing to do would be either
> dict1["key1"] = new Struct1(Convert.ToInt32(xmlText));

Does that work? For some reason I had it in my head that you couldn't simply
assign like that. Maybe I'm confusing that with something else.


From: Jackie on
On 5/20/2010 22:02, Jackie wrote:
> I think the sensible thing to do would be either
> dict1["key1"] = new Struct1(Convert.ToInt32(xmlText));
>
> or change Struct1 into a class instead of struct, and use your existing
> code.

Seems like Jeff was quicker.
From: Jackie on
On 5/20/2010 22:06, Jeff Johnson wrote:
> "Jackie"<Jackie(a)an.on> wrote in message
> news:4bf5956c$0$22834$c3e8da3(a)news.astraweb.com...
>
>> I think the sensible thing to do would be either
>> dict1["key1"] = new Struct1(Convert.ToInt32(xmlText));
>
> Does that work? For some reason I had it in my head that you couldn't simply
> assign like that. Maybe I'm confusing that with something else.
>
>

I gave it a try now to make sure and it worked.
From: Jeff Johnson on
"Jackie" <Jackie(a)an.on> wrote in message
news:4bf59be2$0$5849$c3e8da3(a)news.astraweb.com...

>>> I think the sensible thing to do would be either
>>> dict1["key1"] = new Struct1(Convert.ToInt32(xmlText));
>>
>> Does that work? For some reason I had it in my head that you couldn't
>> simply
>> assign like that. Maybe I'm confusing that with something else.

> I gave it a try now to make sure and it worked.

Good to know, thanks.


From: Andrew Falanga on
On May 20, 2:30 pm, Jackie <Jac...(a)an.on> wrote:
> On 5/20/2010 22:06, Jeff Johnson wrote:
>
> > "Jackie"<Jac...(a)an.on>  wrote in message
> >news:4bf5956c$0$22834$c3e8da3(a)news.astraweb.com...
>
> >> I think the sensible thing to do would be either
> >>    dict1["key1"] = new Struct1(Convert.ToInt32(xmlText));
>
> > Does that work? For some reason I had it in my head that you couldn't simply
> > assign like that. Maybe I'm confusing that with something else.
>
> I gave it a try now to make sure and it worked.

Thanks Jeff and Jackie. It's nice to know that I can do it this way.
As I mentioned earlier, this isn't all of the code. The structure
actually contains more objects than just the one I have here. I don't
know if I want to put all of the arguments to a new structure into
another constructor ... so ... I think I'm just going to change it to
a class and call it good.

Thanks again everyone,
Andy