Error with C# Compiler

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
--
 
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
 
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.
 
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.
 
Back
Top