Home > Net >  WINFROM as base class, inherit the base class of the parent class, how to modify the default base cl
WINFROM as base class, inherit the base class of the parent class, how to modify the default base cl

Time:10-18


To change the default value of the base class code below
Public HuaweiDo1528 ()
{
InitializeComponent();
label17. Text="huawei 1528 single scan";
TxtTM04. Text="1528";

}

Parent has inherited the WINFORM base class 6, is the default value is different, other are all the same,

CodePudding user response:



New Form inherits a base class, the other set properties

CodePudding user response:

Label, TXT is set to the level of protection, in the derived class constructor to assign a value (base. The property),

CodePudding user response:

Public partial class Form2: HuaweiDo1528
{
Public Form2 ()
{
InitializeComponent();
Base. Label17. Text="WWWWWWW";
}
}
An error as below

CodePudding user response:

This way the game as if it won't work, at sixes and sevens error

CodePudding user response:

The
refer to the original poster zhengyingcan response:

To change the default value of the base class code below
Public HuaweiDo1528 ()
{
InitializeComponent();
label17. Text="huawei 1528 single scan";
TxtTM04. Text="1528";

}

Parent has inherited the WINFORM base class 6, is the default value is different, other are all the same,

You this is not a constructor

CodePudding user response:

Feel the 5 floor didn't respond to any content
  •  Tags:  
  • C #
  • Related