|
|
|
|
|
Following examples demonstrate how are the format specifiers rewritten to the output. |
|
|
|
|
|
|
|
|
|
|
|
|
This code provides with connecting the MySQL database and executing the SQL command.
|
|
|
|
|
|
|
|
|
|
|
|
|
You can use "Request.QueryString" to get a QueryString value from the previous pages URL.
|
|
|
|
|
|
|
|
|
|
|
|
|
To sort array of primitive types such as int, double or string use method Array.Sort(Array) with the array as a paramater. |
|
|
|
|
|
|
|
|
|
|
|
|
You can specify search pattern. You can use wildcard specifiers in the search pattern |
|
|
|
|
|
|
|
|
|
|
|
|
Using this code allows to write selected format date text comming from the database in the Datagrid. dataformatstring="{0:dd/MM/yyyy}" code allow user to write formatted date like 06.01.2014. |
|
|
|
|
|
|
|
|
|
|
|
|
To find nodes in an XML file you can use XPath expressions |
|
|
|
|
|
|
|
|
|
|
|
|
This code provides to read XML file and add to the Dropdownlist. This code read the "students.XML" file from local disk and this XML file contains students' information such as name, lastname, class, number.
|
|
|
|
|
|
|
|
|
|
|
|
|
The switch statement is a control statement that selects a switch section to execute from a list of candidates. |
|
|
|
|
|
|
|
|
|
|
|
|
This code calculates the factorial value of number given in textbox |
|
|
|
|
|
|
|
|
|
|
|
|
This example reads the contents of a text file by using the static methods ReadAllText and ReadAllLines from the System.IO.File class. |
|
|
|
|
|
|
|
|
|
|
|
|
This example writes a string to a text file using the WriteLine method of the StreamWriter class. |
|
|
|
|
|
|
|
|
|
|
|
|
The foreach statement iterates through a collection that implements the IEnumerable interface. In contract to for statement, the foreach statement does't use the indexes. |
|
|
|
|
|
|
|
|
|
|
|
|
These examples show how to delete all files (*.*) from a folder in C#. |
|
|
|
|
|
|
|
|
|
|
|
|
This code provides to send message to the user with using Javascript alert() function. "Hello World" alert message is shown after running this example.
|
|
|
|
|
|
|
|
|
|
|
|
|
These examples show how to delete all files (*.*) and folders in C#. |
|
|
|
|
|
|
|
|
|
|
|
|
Show Form2, when the button1, in Form1, is clicked. |
|
|
|
|
|
|
|
|
|
|
|
|
In C# Process.Start (a static method) calls external applications. |
|
|
|
|
|
|
|
|