1: A new Type: enumeration: Enumeration is a descriptive name that defines a limited set of values and cannot contain methods to constrain the possible values enumeration guarantees the reasonableness of the assignment 2:public enum grader (name of the enumeration) {Male,female} public G Ander Studentgrader; Public Gander studentgrader{get{return studentgender;} set{Studentgender =value; }} The enumerator represents the integer value Console.WriteLine (the "Gender value is: {0}", (int) student. Studentgender);//Gets the integer value (int) student represented by the number of enumeration values. Studentgender); The default value of the initial value can be modified from zero to the initial value code: public enum Gender{male=1,famale = 2} 3: Enumeration is converted to a string form: Public enum gender{Male, Famale}//... Console.WriteLine ("My Name: {0}, Gender: {1}", this.) Name
, this.studentGender.Tostring ()); Converts the bit string Tostring (); 4: String conversion to Enum type: (Gender) (Enum.parse (typeof (Gendder), "Male")); Gets the name of the enumeration type The string that needs to be converted Typeof5: How to display a picture on a form: PictureBox control displays a picture in a control sizemode how to handle the relationship between the size of the image and the control ImageList holding the picture 6: The properties of the Timer control (tirm) and the frequency with which events interval events occur, in milliseconds, if the enabled is timed to raise an event Event Start () Start timer stop () Stop timer Note: If you find a timerControl does not work, check that the Enable property is set bit true, default is FALSE7: Record the index of the displayed picture when adding a field//if the currently displayed picture index does not have a maximum value continue to increase if (index< THIS.ILABOUT.IMAGE.COUNT-1) The number of images in//imagelist {index++;} else{//or else start index =0 from the first one;} Set picture box to display picture of this. pbabout.image =ilabout.images[index];---Get the location image specified in ImageList Note: I The definition and initialization of the NDEX variable cannot be written in the program that handles the tick event, otherwise the picture cannot be rotated summarized: 1: Use the PictureBox control to display Picture 2 on the form: Use the Timer control D to have the program repeat one thing at a time. 3: The form is displayed in two ways: modal form: Use the Showdailog () method to display a form as a modal form non-modal form: Use the Show () method to display a form as a modal form
Implementing Windows Data updates