Let's say that your Class name is PetalWishes (and this is Pascal Case which is always recommended for class name. Your method is FindMax (each petal has a number or something like that...it doesn't matter because right now we don't have a real company or client etc.). using System; namespace FlowerApplication { class PetalWishes { public int FindMax (int num 1, int num 2) { int result; if (num1 > num2, return result; } } class Test { static void Main (string [] args) { int a = 100; int b = 200; int ref; PetalWishes n new PetalWishes ref = n.FindMax(a,b); Console.WriteLine ("Max value is : {0}", ref); } } }
Advertisements