469,307 Members | 2,570 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

Error with C# Compiler

qaHi,

I am trying to assign value to a member of object of a struct, the object is
treated under foreach.

I got the error : error CS0170: Use of possibly unassigned field 'price'

according to a thread in same group it is bug with C# 7.0, 7.1
" It is
caused by having semi-large structs or just a large number of structs as
locals"

Is there any SP, Another version?
I've universal subscription of MSDN and got lots of DVDs. If you tell me the
number of the disc, it would save me some time.
Thanks,

Fahad Ashfaque
Nov 16 '05 #1
5 2419
Hello Fahad,
qaHi,

I am trying to assign value to a member of object of a struct, the object is treated under foreach.

I got the error : error CS0170: Use of possibly unassigned field 'price'

according to a thread in same group it is bug with C# 7.0, 7.1
" It is
caused by having semi-large structs or just a large number of structs as
locals"
Interesting. I went looking for that thread and didn't find it, in this
group or any other. I'd love to learn the circumstances around that one.
Of course, that may or may not be your problem. How about if you post some
code?

This error is most often caused by the use of a field within a struct
without you having assigned the struct first.

Is there any SP, Another version?
What version and sp are you using? .Net framework 1.1 is up to SP1, .Net
framework 1.0 is up to SP3
I've universal subscription of MSDN and got lots of DVDs. If you tell me the number of the disc, it would save me some time.
Sorry. I don't have the MSDN personally. You have an index on the first
disk. That will tell you what disk to find the framework service packs on.


Thanks,

Fahad Ashfaque

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
Nov 16 '05 #2
Hi Fahad
What I suggest is that you contact your local Microsoft support as they
would route you within MS as needed and if there is a hot fix for that
they will send it to you. Since you have an MSDN your are entitled to 2
free support incidents at least depending on type of your MSDN
subscription. .Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC
Nov 16 '05 #3
Before you call MS, post the code that is giving you the error
(preferably an entire method) so that we can look at it. Perhaps it's
something that we can explain, that will save you using up one of your
support calls.

Nov 16 '05 #4
Well Nick
You may goto that thread by following this hyperlink
http://groups-beta.google.com/group/...197ef095a185c9
read the whole thread, or atleast read the last message of an MVP.

"Nick Malik [Microsoft]" wrote:
Hello Fahad,
qaHi,

I am trying to assign value to a member of object of a struct, the object

is
treated under foreach.

I got the error : error CS0170: Use of possibly unassigned field 'price'

according to a thread in same group it is bug with C# 7.0, 7.1
" It is
caused by having semi-large structs or just a large number of structs as
locals"


Interesting. I went looking for that thread and didn't find it, in this
group or any other. I'd love to learn the circumstances around that one.
Of course, that may or may not be your problem. How about if you post some
code?

This error is most often caused by the use of a field within a struct
without you having assigned the struct first.

Is there any SP, Another version?


What version and sp are you using? .Net framework 1.1 is up to SP1, .Net
framework 1.0 is up to SP3
I've universal subscription of MSDN and got lots of DVDs. If you tell me

the
number of the disc, it would save me some time.


Sorry. I don't have the MSDN personally. You have an index on the first
disk. That will tell you what disk to find the framework service packs on.


Thanks,

Fahad Ashfaque

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--

Nov 16 '05 #5
Hello Fahad,

The last message wasn't posted my an MVP. It was posted by a Microsoft
employee.

I'll ask around.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Fahad Ashfaque" <Fa***********@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
Well Nick
You may goto that thread by following this hyperlink
http://groups-beta.google.com/group/...197ef095a185c9

read the whole thread, or atleast read the last message of an MVP.

"Nick Malik [Microsoft]" wrote:
Hello Fahad,
qaHi,

I am trying to assign value to a member of object of a struct, the object
is
treated under foreach.

I got the error : error CS0170: Use of possibly unassigned field
'price'
according to a thread in same group it is bug with C# 7.0, 7.1
" It is
caused by having semi-large structs or just a large number of structs as locals"


Interesting. I went looking for that thread and didn't find it, in this
group or any other. I'd love to learn the circumstances around that

one. Of course, that may or may not be your problem. How about if you post some code?

This error is most often caused by the use of a field within a struct
without you having assigned the struct first.

Is there any SP, Another version?


What version and sp are you using? .Net framework 1.1 is up to SP1, ..Net framework 1.0 is up to SP3
I've universal subscription of MSDN and got lots of DVDs. If you tell
me the
number of the disc, it would save me some time.


Sorry. I don't have the MSDN personally. You have an index on the first disk. That will tell you what disk to find the framework service packs on.


Thanks,

Fahad Ashfaque

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--

Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mike Fisher | last post: by
30 posts views Thread by Neil Zanella | last post: by
2 posts views Thread by Mary | last post: by
reply views Thread by rollasoc | last post: by
1 post views Thread by Ayende Rahien | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.