Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
C# Tutorial
Class 307 codes
Home
C# Tutorial
Class
1 A base class reference can refer to a derived class object
2 A class which implements comparison and equality interfaces
3 A class with method and member variables
4 A member function with two arguments
5 A multilevel hierarchy
6 A parameterized constructor
7 A partial class can span multiple source files
8 A simple class hierarchy
9 A Simple Class showing class definition syntax
10 A Simple Class with member fields and constrctor
11 A simple example of recursion
12 A simple property example
13 A simple, but complete, C# class
14 A subclass uses the keyword base to invoke a particular subclass constructor
15 A two-dimensional indexer
16 Abstract class with three virtual methods
17 Abstract Interface
18 Access Control - demonstrate the various forms of access control
19 Accessing an interface from a class
20 Add a constructor to Triangle
21 Add a constructor with three parameters
22 Add a method to access the field variables
23 Add constructor to class
24 Add constructors to base class
25 Add Length property to MyArray
26 Add more constructors to base class
27 Add statement to the getter and setter of a property
28 Add title case to string class
29 Adding extension method for int
30 Adding extension to Stream
31 Adding reverse operation to string
32 An example of inheritance-related name hiding
33 An overloaded constructor
34 Assign null to myHouse (myHouse will no longer reference an object)
35 Assign values to the House objects fields using object renerence
36 Automatic type conversions can affect overloaded method resolution
37 Base and derived classes
38 Base class and interface
39 Base destructor
40 C# Accessibility Keywords
41 C# Parameter Modifiers
42 C#s Access Specifiers
43 Call a hidden method
44 Call base constructor to init member variables
45 Call constructor in base class
46 Call Constructor in the same class using this
47 Call GetType and ToString on object instance
48 Call object Equals to compare objects
49 Change the object referenced by the myHouse object reference to the object referenced by yourHouse
50 Class can contain class
51 Class comparison
52 Class Fundamentals
53 Class inheritance with virtual method
54 Class nesting
55 Class without default constructor
56 Clone a list of cloneable objects
57 Cloneable Point
58 Combine readonly and read only property
59 Complex IDisposable pattern
60 Conflicting extension methods
61 Constuctor hidden
62 Conversions of Classes (Reference Types) to an Interface the Object Might Implement
63 Conversions of Classes (Reference Types) To the Base Class of an Object
64 Copy a class
65 Copy constructor
66 Create a clone using the Object MemberwiseClone method because the Employee class contains only string and value types
67 Create an abstract class
68 Create new instance in static Properties
69 Create two objects for one class
70 Creating a House object and assigning its memory location to myHouse
71 Creating a method with a reference argument
72 Creating a read-only property
73 Creating an array of objects
74 Creating an interface
75 Creating One-Dimensional Indexers
76 Declare a House object reference named myHouse
77 Declare an interface and implement it
78 Declare an object of type Building
79 Declare another House object reference and create another House object
80 Declare class fields and methods
81 Define abstract class and abstract method
82 Define accessors for Properties with get and set
83 Define and use partial class
84 Define base class another cs file
85 Define both int and string indexer for a class
86 Define constants with const keywords
87 Define getter only indexer
88 Define methods
89 Define private constructors to make a singleton
90 Define Rectangle class with method to compute the area
91 Define virtual function in base and its subclass
92 Demonstrate a destructor
93 Demonstrate a static class
94 Demonstrate a virtual method
95 Demonstrate method overloading
96 Demonstrate protected
97 Demonstrate ToString()
98 Demonstrate when constructors are called
99 Destructors
100 Display a string in reverse by using recursion
101 Display the field values using object reference
102 Dispose() is called automatically when the using block exits
103 Do calculation with Property
104 Duplicate Interface Members
105 Encapsulation example
106 Explicit Interface Implementation
107 Explicit interface implementation and its own implementation
108 Explicitly implement an interface member
109 Extends class and implements interface
110 Extends IEnumerablestring
111 Extension method
112 Extension Method On Null Reference
113 Extension Methods
114 Fibonacci in C#
115 Field initialization
116 Fields
117 Format value in ToString method
118 Formattable Vector
119 Generic partial class
120 How Arguments Are Passed
121 How to define methods that return a value and accept parameters
122 How to override the ToString() method
123 How to use a has a relationship
124 ICustomFormatter IFormatProvider
125 IEnumerable T>
126 Illustrates a destructor
127 Illustrates how to assign default values to fields using initializers
128 Illustrates member accessibility in subclass
129 Illustrates member hiding
130 Illustrates polymorphism
131 Illustrates versioning
132 Implement an interface
133 Implement ICloneable interface
134 Implement multiple interfaces
135 Implementation of IDisposable
136 Implementation of IFormattable
137 Implements IEnumerator
138 Implements IFormatProvider, ICustomFormatter
139 Implements IFormattable with switch statement
140 Implicit this
141 Indexer based on 0 or non-zero
142 Indexer based on switch statement
143 Indexer for generic type
144 Indexers dont have to operate on actual arrays
145 Indexing with an Integer Indexer
146 Indexing with an String Indexer
147 Indexing with Multiple Parameters
148 Inheritance from both class and interface
149 Inherited Implementation
150 Inherited interface
151 Inherited member methods and fields
152 Inner class
153 Instance Class Members
154 Instance Counting
155 Interface Explicit Implementation
156 Interface Inheritance Demo
157 Interface member hiding
158 Interface Properties
159 Interfaces
160 Interfaces and Inheritance
161 Interfaces Based on Interfaces
162 Interfaces Inheriting Interfaces
163 Internal sealed class
164 Invoke a constructor through this
165 Invoke a method in a class
166 Invoke Indexed Property Demo
167 Local Constants
168 Mark override when overriding ToString
169 Member Functions
170 Method Overloading
171 Method parameter hides the class member field
172 Methods of the object Class
173 Methods That Return a Value and Accept Parameters
174 Multiple Constructor version without duplicating a lot of the constructor code
175 Multiple Implementation
176 Multiple Interfaces
177 Nested class object
178 Nested methods
179 New method
180 New virtual method
181 Object Class Methods
182 One interface can inherit another
183 Overload the MyArray indexer
184 Overloaded constructors
185 Overridden Equals()
186 Override abstract method
187 Override the GetHashCode method from object
188 Override ToString
189 Override ToString method twices
190 Override virtual functions
191 Override virtual method
192 Override without override keyword
193 Overriding a method
194 Overriding Virtual Methods
195 Parameter modifiers
196 Params int[] args
197 Pass a derived class reference to a base class reference
198 Pass int value to a function
199 Pass int without out and ref
200 Pass integer by ref
201 Pass integer value by value
202 Pass reference type variable without out and ref
203 Passing ref-types by ref
204 Perform a memberwise clone of myEmployee using the Employee Copy() method
205 Polymorphism and Virtual Functions
206 PrintValue() Added to the BaseClass Class
207 Private copy constructor used when making a copy of this object
208 Private static and const Fields
209 Properties and its Restrictions
210 Property And its associated Field
211 Property Getter and Setter
212 Public member method
213 Public vs private access
214 Put logic to property setter
215 Readonly and const
216 Readonly Fields
217 Readonly property
218 Recursion Count
219 Ref parameters
220 Reference a static member function without using the class name
221 Reference a static member variable without using the class name
222 Reference an object by interface and class
223 Reference equals
224 Reference one object by multiple interfaces
225 Reference Static Field without Instance
226 Reference to Base Class
227 Reference type equals
228 Resolving Ambiguity with the new Keyword
229 Resolving Ambiguity with the override Modifier
230 Return a value from a member method
231 Return an array
232 Return an object
233 Return int from function
234 Re-using Base Class Identifiers
235 Sealed Classes
236 Sealed methods
237 Sealed types and methods
238 Simple Finalize
239 Simple IDisposable pattern
240 Simple Inheritance
241 Static class and its inner class
242 Static constructor 2
243 Static Constructors
244 Static field init
245 Static Fields
246 Static inner class constructor
247 Static Member Functions
248 Static members of System Object
249 Static Properties
250 Static readonly fields
251 Supporting foreach with IEnumerable and IEnumerator
252 The General Form of a Class
253 The modifiers can be applied to members of types, and have various uses
254 The use of const int
255 The use of various access modifiers
256 Three-level Override methods
257 Throw Exception from property setting
258 Throw your own exception from class constructor
259 Try to change static value in different instance
260 Update static field in the deconstructor
261 Use a class factory
262 Use a parameter in a member function
263 Use a static constructor
264 Use a static field to count instances
265 Use an access modifier with an accessor
266 Use an indexer to create a fail-soft array
267 Use base keyword to access field in the base class
268 Use Constructor to initialize member variables
269 Use destructor and implement IDisposable
270 Use explicit implementation to remove ambiguity
271 Use expressions to calculate and display the circumference of a circle
272 Use indexer to add element
273 Use interface as a parameter
274 Use interface as reference
275 Use interface keyword to define an interface
276 Use internal
277 Use MemberwiseClone method to clone object
278 Use new with a value type
279 Use Not Disposible object in using statement
280 Use of outer variable in anonymous method
281 Use out for int type
282 Use Properties to get and set private member variable
283 Use properties to set and get private members
284 Use readonly
285 Use static
286 Use the inherited Object methods
287 Use this and base together to init a class
288 Use this to reference shadowed member variables
289 Use virtual methods and polymorphism
290 Using a string as an indexer value
291 Using Abstract Classes
292 Using base to Access a Hidden Name
293 Using base to overcome name hiding
294 Using Internal on Members
295 Using Methods inherited from the System Object class
296 Using Methods to change private fields
297 Using the binary reader and writer for psuedo-serialization
298 Value Types
299 Variable arguments to a method in C#
300 Virtual Accessor
301 Virtual and override member function
302 Virtual method in a multilevel hierarchy
303 Virtual Methods and Overriding
304 Virtual Properties
305 Visibility modifiers indicate which other code items can view an item
306 When a virtual method is not overridden, the base class method is used
307 Write Only Properties and