Home > Net >  Pray god help!
Pray god help!

Time:09-21

Private static void GetParam (Control c, ref string STR)
{
Try
{
The foreach (Control CTL in Arthur c. ontrols)

{

If (CTL is TextBox)
{
TextBox tx=CTL as TextBox.

STR +=tx. Name + + tx. "$" Text +" | ".
}
Else if (CTL is the CheckBox)
{
The CheckBox tx=CTL as CheckBox;
STR +=tx. Name + "$" + tx. Checked +" | ".
}
Else if (CTL is ComboBox)
{
ComboBox tx=CTL as ComboBox.
STR +=tx. Name + + tx. "$" Text +" | ".
}
Else if (CTL is NumericUpDown)
{
NumericUpDown tx=CTL as NumericUpDown;
STR +=tx. Name + "$" + tx. Value +" | ";
}

If (CTL) Controls) Count & gt; 0) GetParam (CTL, ref STR);
}
}
The catch (Exception)
{
}
}
Only two numerical input control interface, but out of STR is not what I want string

CodePudding user response:

In this code private static void GetParam (Control c, ref string STR) on the breakpoint and then use the single step debugging, staring at the local variable window, you will know what's the matter with the

How to add the code to VisualStudio breakpoint debugging see breakpoint debugging Windows source code

How to step through and local variable window to see see dotnet code debug method
  •  Tags:  
  • C #
  • Related