WIN7 system to run C # programs, has prompted the object instance is not created. Great God take a look

 

 

 Prompt does not create an object instance of this common problem are very good looking, but this I really do not know why

we have not encountered the problem can not write their own programs to run on a number of machines.
I talk about my development environment
Win10 system, vs2013, my generation is .net2.0 framework, in fact, not only is there 2.0,3.5,4.0,4.5 install the appropriate version of .net have tried to target machine can not solve problem
and the present situation of the two computer systems are problems win7, and the error code is the same line

C # code
 
?
1
2
3
4
5
private  void  cbB_JmpFreq_SelectedIndexChanged( object  sender, EventArgs e)
         {
             
             RadioInfoDat.JmpFreq = cbB_JmpFreq.SelectedIndex; //问题代码是这一行,就是这一行,只有这一行
         }


What I do is a winform program. The SelectedIndexChanged event I believe we have written, I SelectedIndexChanged content of other controls is such a way, but only error error this line. Why is this?

C # code
 
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
  
************** 异常文本 **************
  
System.NullReferenceException: 未将对象引用设置到对象的实例。
     
在 CPS_NoneDisplay.FormRadioInformation.cbB_JmpFreq_SelectedIndexChanged(Object sender, EventArgs e) 位置 e:\Project\MYT-390\13_SW_Resource\CCTX-618\CPS_NoneDisplay\FormRadioInformation.cs:行号 636
     
在 System.Windows.Forms.Control.OnMarginChanged(EventArgs e)
在 System.Windows.Forms.Control.set_Margin(Padding value)
     
在 System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified)
     
在 System.Windows.Forms.ComboBox.ScaleControl(SizeF factor, BoundsSpecified specified)
     
在 System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
     
在 System.Windows.Forms.Control.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
     
在 System.Windows.Forms.Control.ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
     
在 System.Windows.Forms.Control.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
  在 System.Windows.Forms.ContainerControl.OnChildLayoutResuming(Control child, Boolean performLayout)
     
在 System.Windows.Forms.Control.OnLayoutResuming(Boolean performLayout)
     
在 System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
    
在 CPS_NoneDisplay.FormRadioInformation.InitializeComponent() 位置 e:\Project\MYT-390\13_SW_Resource\CCTX-618\CPS_NoneDisplay\FormRadioInformation.Designer.cs:行号 214
     
  
在 CPS_NoneDisplay.FormRadioInformation..[code=csharp]

Guess you like

Origin www.cnblogs.com/yew1986/p/12084156.html