Finishing essay!!!

Source: Internet
Author: User

Focus: 1, enter cast int b=convert.toint32 (Consloe,readline ()), 2, Judge Leap Year if (a%400==0| |              A%4==0 && a%100!=0) 3, stochastic generator random rand=new random (); Int D=rand. Next (3); {Randomly generate a number not exceeding three} example: static void Main (string[] args) {string[]cellphone=new string[] {"122321341", "12453145", " 18234287234 "," 14420408420 "," 14234243481 "," 14234324 "," 1434234324 "," 321114221 "," 321111212 "}random rand=new Random ( ); for (int i=0;i<50;i++) {//Slows down some System.Threading.Thread.Sleep (100);//randomly generates array subscript int Sub=rand. Next (cellphone. LENGTH);//The element value of the array according to the subscript string s=cellphone[sub];//display console.clear (); Console.WriteLine (s);}} 4, Cycle (small 99) apply the exhaustive (there are three kinds of shares of the coins 1 minutes 3 minutes 5 points together to buy 1.5 yuan of the chickens of how many combinations (number and kind) and iteration (5 of the first 100 items of the number and) 5, traversing the array foreach (int m in a) Consloe.writeline ("Times The "+m" 6, Object class class N=new object P=new Object object. The Field object. Method ("") Encapsulates (heart, mind, not accept) member field (privaty) lowercase Start method (string name) property (set{this . Name=value;} Get{return}) Capitalize the beginning of the access level public privaty (only own member access) this. Self-class stuff reflector anti-compiler 7,//First step: Connect to Database SqlConnection conn=new SqlConnection ("server=.; Database=data1220;user=sa;pwD= ") Conn. Open ();//second part: Write execution Statement SqlCommand Cmd=conn. CreateCommand (); cmd. commandtext= "Select*from Users where Uname= '" +username+ "' and upass= '" +upass+ "'";//Read SqlDataReader dr=cmd. ExecuteReader (); if (Dr. Read ()) {MessageBox.Show (dr["uname"). ToString ());} Conn. Close ();

  

Finishing essay!!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.