CSharp Code
From codeuu,source code
| How To: | Add an article | Review an article | Edit an article | Categorize an article | FAQ |
Become a volunteer editor! Help Wiki the codeuu Website - together we can build a better, more open and free, code site!
|
Contents |
Getting Started
- Illustrating multiline comments:CSharp
- The using keyword:CSharp
- Code that doesn't compile (not legal C#):CSharp
C# Language Fundamentals
- Initializing and assigning a value to a variable:CSharp
- Calling a method:CSharp
- Division and modulus:CSharp
- Using an uninitialized variable:CSharp
- Assigning without initializing:CSharp
- Using symbolic constants:CSharp
- Using enumerations to simplify your code:CSharp
- if...else statements:CSharp
- Prefix versus postfix increment:CSharp
- Nested if statements:CSharp
- The ternary operator:CSharp
- The switch statement:CSharp
- Using goto:CSharp
- Using a while loop:CSharp
- The do...while loop:CSharp
- The for loop:CSharp
- Scope of variables declared in a for loop:CSharp
- Using continue and break:CSharp
Classes and Objects
- Simple Time class:CSharp
- Declaring a constructor:CSharp
- Using static fields for instance counting:CSharp
- The using statement:CSharp
- Returning values in parameters:CSharp
- Overloading the constructor:CSharp
- Using a property:CSharp
- Using static public constants:CSharp
- Passing values into SomeMethod():CSharp
- Using an initializer:CSharp
- Using in, out, and ref parameters:CSharp
- Varying the return type on overloaded methods:CSharp
Inheritance and Polymorphism
- Using virtual methods:CSharp
- Using an abstract method and class:CSharp
- Inheriting from Object:CSharp
- Boxing and unboxing:CSharp
- Using a nested class:CSharp
Operator Overloading
Structs
Interfaces
- Using the is operator:CSharp
- Overriding an interface implementation:CSharp
- Explicit implementation:CSharp
- Extending and combining interfaces:CSharp
- References on value types:CSharp
Arrays, Indexers, and Collections
- Working with an array:CSharp
- Using foreach:CSharp
- Using a simple indexer:CSharp
- Making a ListBox an enumerable class:CSharp
- Using constraints:CSharp
- Working with List:CSharp
- Working with a queue:CSharp
- Working with a stack:CSharp
- The Item property as offset operators:CSharp
- Using the params keyword:CSharp
- Rectangular array:CSharp
- Initializing a multidimensional array:CSharp
- Overloading an index:CSharp
- Working with a jagged array:CSharp
- Converting arrays:CSharp
- Using Array.Sort and Array.Reverse:CSharp
- Sorting an integer and an employee array:CSharp
- Sorting an array by employees' IDs and years of service:CSharp
Strings and Regular Expressions
- Working with strings:CSharp
- Using the Regex class for regular expressions:CSharp
- Using the Substring() method:CSharp
- Using the Split() method:CSharp
- Using a StringBuilder:CSharp
- Using static Regex.Split():CSharp
- Using MatchCollection and Match:CSharp
- Using the Group class:CSharp
Handling Exceptions
- Throwing an exception:CSharp
- Working with an exception object:CSharp
- Creating a custom exception:CSharp
- Rethrowing inner exceptions:CSharp
- Catching an exception:CSharp
- Examining the Captures collection:CSharp
- Catch in a calling function:CSharp
- Specifying the exception to catch:CSharp
- Using a finally block:CSharp
Delegates and Events
- Working with delegates:CSharp
- Combining delegates:CSharp
- Implementing events with delegates:CSharp
- Using the event keyword:CSharp
Others
- The XML output (excerpt) for file copy:CSharp
- Working with ADO.NET:CSharp
- Using the ADO Managed Provider:CSharp
- The .aspx file:CSharp
- Skeleton web class generated by Visual Studio .NET:CSharp
- Sample client code to access the calculator web service:CSharp
- CSharpISBN.xml:CSharp
- Displaying the output:CSharp
- SalesRankDBWebServices02:CSharp
- The Fraction class:CSharp
- Working with custom attributes:CSharp
- Using reflection:CSharp
- Marshaling across app domain boundaries:CSharp
- The Calculator interface:CSharp
- Using threads:CSharp
- Simulating a shared resource:CSharp
- Recursing through subdirectories:CSharp
- Implementing a binary read and write to a file:CSharp
- Implementing asynchronous I/O:CSharp
- Implementing a network streaming server:CSharp
- Reading a web page as an HTML stream:CSharp
- Serializing and deserializing an object:CSharp
- Writing to isolated storage:CSharp
- Implementing the CalcControl ActiveX control:CSharp
- Implementing the methods for ComCalc:CSharp
- The four-function calculator in a DLL:CSharp
- Declaring Win32 API methods for import into a C# program:CSharp
- Code-behind form for Shipper.aspx.cs:CSharp
- Calculator web service program:CSharp
- A client program to test the calculator web service:CSharp
- Code-behind file for SalesDisplay:CSharp
- SalesRankDBWebServices:CSharp
- The calculator:CSharp
- The complete makefile for a multimodule assembly:CSharp
- A module test-driver:CSharp
- Reflecting on an assembly:CSharp
- Reflecting on a type:CSharp
- Reflecting on the members of a type:CSharp
- Finding particular members:CSharp
- Dynamically invoking a method:CSharp
- The Calculator server:CSharp
- The remoting Calculator client:CSharp
- Manually instantiating and associating Calculator with an endpoint:CSharp
- Interrupting a thread:CSharp
- Marshaling an object without a well-known endpoint:CSharp
- Using a Monitor object:CSharp
- Implementing buffered I/O:CSharp
- Reading and writing to a text file:CSharp
- Exploring files and subdirectories:CSharp
- Creating a subdirectory and manipulating files:CSharp
- Working with a nonserialized object:CSharp
- Reading from isolated storage:CSharp
- Using the CalcControl ActiveX control in a VB program (TestForm):CSharp
- Implementing event handlers for the test Windows Form:CSharp
- The driver program for ComCalc.dll:CSharp
- Implementing event handlers for the VB6 COM DLL test form:CSharp
- Late binding of COM objects:CSharp
- Invoking the calculator COM object with a Windows-scripting host file:CSharp
- Using pointers in a C# program:CSharp
- Implementing a network streaming client:CSharp
- Implementing an asynchronous network streaming server:CSharp
- Implementing a client for asynchronous network I/O:CSharp
- Implementing an asynchronous network file server:CSharp
