View Single Post
  #1 (permalink)  
Old February 15th, 2015, 12:45 AM
Marek Marek is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2015
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default I can't access public varable.

Warning 1 Accessing a member on 'WindowsFormsApplication1.NewItemForm.PriceEach' may cause a runtime exception because it is a field of a marshal-by-reference class C:\Users\Mark\Desktop\Visual C# Folders\C#24 hours completed excersises\Try13\WindowsFormsApplication1\Form1.cs 30 34 WindowsFormsApplication1

Hi

I need help with TryIt 13 exercise. When I click OK button to accept fields on the main form I get above message . I am using Visual Studio 2010 professional , academic edition. Tried to re-assign fields to local variables and display them but it did not help.No idea why original (solution) program work and mine does not. Thanks for help.

Mark