CSharp examples for Custom Type:Method
A return statement can appear anywhere in a method except in a finally block.
using System;/*from w w w. j a va 2s . c o m*/ class Test { static decimal AsPercentage(decimal d) { decimal p = d * 100m; return p; // Return to the calling method with value } static void Main() { Console.WriteLine(AsPercentage((decimal)0.1)); } }