13.07.2015 Views

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3: C# and <strong>ASP</strong>.<strong>NET</strong> <strong>3.5</strong> 63SymbolDescription&&logical AND|| logical OR! logical NOTTable 3-5 Logical Operatorsthe temperature is cold enough to sustain snow and whether snow is actually on theground. So you might have code like the following:bool temp = true;bool snow = true;bool both = (temp && snow);//both resolves to trueIf you only wanted one or the other to be true, you would use the statementbool either = (temp || snow);For the most part, you will be using the kinds of basic operators discussed in this section. C#also has bitwise operators that you’re unlikely to use unless you’re familiar with binary math.Symbols in Grammar and PunctuatorsThe grammar and punctuator symbols are similar to those found in other modern<strong>com</strong>puter languages. Table 3-6 shows the main symbols not used as operators and howthey are used in C#.SymbolDescription; Statement terminator; also element delimiter in for statement, Element separator in arrays{} Open and close conditional statements, loops, functions, and classes[] Array element delimiter() Parameter delimiters// Single-line <strong>com</strong>ment/* … */ Block <strong>com</strong>ment: Case delimiters in switch statement. Also used in class declaration to inherit asuper classTable 3-6 Key Punctuation and Grammar Symbols

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!