Core C# and .NET Quick Reference - cheat sheets
Core C# and .NET Quick Reference
1. Data Types
Primitive
string bool char byte short int long float double decimal
Size 2 bytes/char
2 bytes 1 byte 2 bytes 4 bytes 8 bytes 4 bytes 8 bytes 16 bytes
2. Arrays
Example
s = "reference"; b = true; ch = `a'; b = 0x78; Ival = 54; Ival = 540; ival = 5400; val = 54.0F; val = 54.0D; val = 54.0M;
Declaration int[] numArray = {1903, 1907, 1910}; int[] numArray = new int[3]; // 3 rows and 2 columns int[ , ] nums = {{1907, 1990}, {1904, 1986}, {1910, 1980}};
Array Operations Array.Sort(numArray); // sort ascending // Sort begins at element 4 and sorts 10 elements Array.Sort(numArray, 4,10); // Use one array as a key and sort two arrays string[] values = {"Cary", "Gary", "Barbara"}; string[] keys = {"Grant", "Cooper", "Stanwyck"}; Array.Sort(keys, values); // Clear elements in array (array, 1st element, # elements) Array.Clear(numArray, 0, numArray.Length); // Copy elements from one array to another Array.Copy(src, target, numelements);
3. String Operations
Method Compare
Description pare(stra, strb, case, ci)
bool case ? true for case insensitive ci ? new CultureInfo("en-US") returns: ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- scrabble cheat sheets 2019
- stats cheat sheets and formulas
- icd 10 cheat sheets free
- conversion cheat sheets for measurement
- grammar cheat sheets for adults
- bible cheat sheets printable
- algebra cheat sheets high school
- cpr cheat sheets printable
- cheat sheets for python
- cpt codes cheat sheets free
- free football cheat sheets printable
- cheat sheets for acls