User-submitted CSharp Projects

30
1224 reads
eumer77's picture

Submitted by

eumer77
TemperatureConverterSystem
A basic program that performs temperature conversion from * 1. Celsius to Fahrenheit * 2. Fahrenheit to Celsius * 3.
Run It Now!
27
1641 reads
adaptpeer's picture

Submitted by

adaptpeer
Tags:

96
1702 reads

February 22, 2013

ACCESSORS AND MUTATORS


Let us see an example of Department class. To manipulate the data in that class (String departname) we define an accessor (get method) and mutator (set method).

59
1871 reads

February 22, 2013

Bank system


A parent class BankAccountProtected has 3 protected virtual methods and 2 child SavingsAccount and CheckingAccount. Each one overrides the virtual functions.

346
3455 reads

February 13, 2013

class point


The following example demonstrates interface implementation.

288
3220 reads

February 12, 2013

using interfaces


This example uses interfaces:

One interface introduces two properties
One interface introduces a method
One interface inherits from two interfaces but adds a new property

30
1863 reads

February 12, 2013

Interfaces


Any class or struct that implements the IEquatable interface must contain a definition for an Equals method that matches the signature that the interface specifies.

227
2261 reads

February 12, 2013

struct vs class


This example shows that when a struct is passed to a method, a copy of the struct is passed, but when a class instance is passed, a reference is passed.

191
3465 reads

February 12, 2013

Date Time


In this program, we demonstrate that a DateTime is a struct. We create a DateTime and then copy it into a separate DateTime variable. When the original changes, though, the copy remains the same.

219
2847 reads

February 12, 2013

using properties with the struct


we see an example of using properties with the struct type. Remember that your struct cannot inherit like classes or have complex constructors.