TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mal Coppo
NA
16
1.4k
c# question how do i pass variables to the main, while in cl
May 10 2018 4:55 AM
using System;
public class Program
{
public void CalculateArea(int Height, int Base, int Area) //function header
{
Console.Write("Enter Height: ");
Height = int.Parse(Console.ReadLine());
Console.Write("Enter Base: ");
Base = int.Parse(Console.ReadLine());
Area = Height * Base / 2;
Console.WriteLine("Area of Triangle = {0}", Area);
}
public void Validation(int Height, int Base, int Area){
}
public void Main(string[] args)
{
Console.WriteLine("Triangle Area Calculator");
CalculateArea(); //function call
Console.WriteLine("Program Complete");
}
}
Reply
Answers (
3
)
Facebook Share option
Insert data into database through selected checkbox item MVC