Variable = Expression;The variable can be a declared variable or a control property value. The expression could be a mathematical expression, a number, a string, a Boolean value ( or ), etc. The following are some examples:
userpass.Text = password; command1.Visible = false; thirdNumber = int.Parse( usernum1.Text );It is a good programming practice to initialize variables properly, otherwise sometimes program may produce unexpected result. The following example uses various types of variables:
|
“Part of [the $10 million] went for gambling, horses, and women. The rest I spent foolishly.” — George Raft |