Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
SingleDelegate
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { delegate int ArithOp(int x,int y); class MathOperation { public static int Add(int a,int b) { return(a + b); } public static int Sub(int a,int b) { return(a - b); } class DelegateTest { public static void main( ) { ArithOp op1 = new ArithOp(MathOperation.Add); ArithOp op2 = new ArithOp(MathOperation.Sub); int result1 = op1(100,200); int result2 = op2(500,200); Console.WriteLine("RESULT1 ="+result1); Console.WriteLine("RESULT2 ="+result2); } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
algo1
SKYIES
Add char to non-numerical words only
learning
project euler 11, C#
Number to string
selection sort
Math 5.83b
różne wersje parsowania kwoty i daty (CultureInfo)
Recursion
Please log in to post a comment.