I refer to the book Beginning ASP.NET 2.0 in C# from Novice to Professional, By Matthew MacDonald
Ch 1 .Introducing the .NET Framework
Ch 2 Learning the C# Language
C# is CASE SENSITIVE
Commenting:
//
/* multiline
comment */
XML-based commenting
/// <summary>
/// comment here
/// </summary>
Line Termination
semicolon (;)
Block Structures (braces)
{
// code statements here
}
Variable and Data Types
int errorCode;
C# data type names (all lower case)
.NET Class Library Name | C# Name |
Byte | byte |
Int16 | short |
Int32 | int |
Int64 | long |
Single | float |
Double | double |
Decimal | decimal |
Char | char |
String | string |
Boolean | bool |
DateTime | use .NET class name |
TimeSpan | use .NET class name |
Object | object |
example1001_type.aspx .txt file, a data type example.
Escape Characters backslash (\)
\" double quote
\n new line
\t horizontal tab
\\ backward slash
example1002_escape.aspx .txt file, escape character example
Arrays & ArrayList (dynamic array)
example1003_array.aspx .txt file, array example
Enumerations (a group of related constants)
Ch 16 Files and Streams
Allowing File Upload
example1004_upload.aspx .txt file, File Upload Example
example1004_upload.aspx.cs .txt file contains the main code (also include code to get current data and time)
Web.Config .txt file controls the upload file size (in KB)
Displaying File Information and Deleting File
example1005_file.aspx.txt file.
example1005_file.aspx.cs .txt file contains the main code
Create TextFile, Write Textfile, Read TextFile (single user, multi-user mode)
example1006_readfile.aspx txt file.
example1006_readfile.aspx.cs. txt file contains the main code