The second day of the 10 day society asp.net

Source: Internet
Author: User
asp.net learning Purpose: Mastering the basic knowledge of C #

One, define variable:
String strexample; String ("AAA")
Char chrexample; Character (' a ')
BOOL Blnexample; type bool (TRUE/FALSE)
Datatime datexample; Date type ("09/19/2002")
int intexample; Integer (32-bit signed integer)
Double dblexample; Floating-point number (64-bit double-precision floating-point number)
Two, various operations:
= Assignment operation
+ addition operation
-Subtraction operation
* Multiplication operation
/Division Operations
% modulo operation
&& Logical AND
|| Logical OR
! Logical not
III. Various structures:
if (condition)
{
}
Else
{
}

Switch (condition)
{
Case Option1:
Break
Case Option2:
Break
}

for (int i=1;i<=10;i++)//Special Note this is a semicolon.
{
}

while (condition)
{
}

Todo
{
}while (condition);
Four, Attention matters:
1, with the habit of VB people can easily miss the end of the semicolon sentence;
2, with the habit of VB people very casually use variables but do not declare, this is not allowed by default in C #;
3, in the transfer of parameters to the function of the time to use parentheses: Response.Write "AA"; is not allowed.

I said this is almost not to say that a language, a language learning not only need to learn grammar, but also need to learn language features, I hope we have the time to buy a C # book to study well the C # as a new language features it. Let's talk about it today. Web controls tomorrow.



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.