May 2010
Intermediate to advanced
1752 pages
41h 17m
English
C#, like any programming language, has a canned set of tokens that are used to perform basic operations on intrinsic types. For example, you know that the + operator can be applied to two integers in order to yield a larger integer:
// The + operator with ints. int a = 100;
int b = 240; int c = a + b; // c is now 340
Once again, this is no major newsflash, but have you ever stopped and noticed how the same + operator can be applied to most intrinsic C# data types? For example, consider this code:
// + operator with strings. string s1 = "Hello"; string s2 = " world!"; string s3 = s1 + s2; // s3 is now "Hello world!"
In essence, the + operator functions in specific ways based on the supplied data types ...