Created
May 4, 2012 06:17
-
-
Save tnngo2/2592542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MathsDemo.cs | |
partial interface IMathsDemo | |
{ | |
int Addition(int valOne, int valTwo); | |
} | |
// MathsDemo2.cs | |
partial interface IMathsDemo | |
{ | |
int Subtraction(int valOne, int valTwo); | |
} | |
class Calculation : IMathsDemo | |
{ | |
public int Subtraction(int valOne, int valTwo) | |
{ | |
return valOne + valTwo; | |
} | |
public int Addition(int valOne, int valTwo) | |
{ | |
return valOne - valTwo; | |
} | |
static void Main(string[] args) | |
{ | |
int numOne = 45; | |
int numTwo = 10; | |
Calculation objCalculate = new Calculation(); | |
Console.WriteLine("Addition of two numbers: " + objCalculate.Addition(numOne, numTwo)); | |
Console.WriteLine("Subtraction of two numbers: " + objCalculate.Subtraction(numOne, numTwo)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment