Discussion :: Functions and Subroutines - General Questions (Q.No.9)
Andrew Cope said: (Oct 29, 2013) | |
Bad question. C# programmers shouldn't use the term 'procedure'. They are functions or methods. |
Tipu said: (Mar 31, 2014) | |
Why not C# methods return a value? |
Fred said: (Apr 16, 2014) | |
What about : void fun (int i, Single j, double k, out decimal m) ? |
Raghvendra Singh said: (Dec 5, 2014) | |
"out" parameter is used to return single or multiple values in case of declaring a function as void (no return type). |
Alek said: (May 5, 2015) | |
There is no such thing as procedure in C#. |
Anindita said: (Aug 28, 2017) | |
Let's assume the procedure as method or function, so I tried with this following code, and it is working fine: namespace Testreturntype { class Program { static void Main(string[] args) { Console.Write(fun(5, 2, 2.00)); Console.ReadKey(); } public static decimal fun(int a, Single s, double k) { decimal d = Convert.ToDecimal(a * s * k); return d; } } } |
Post your comments here:
Name *:
Email : (optional)
» Your comments will be displayed only after manual approval.