Professional Documents
Culture Documents
syntax
using System;
namespace Greet
{
class Intro
{
static void Main(string[] args)
{
}
public void Greet()
{
Console.WriteLine("Hello gorgeous, Good Morning!");
}
public void Greet(string firstName, string lastName)
{
Console.WriteLine("Hello gorgeous, Good Morning!! {0}, {1}", firstName, lastName);
}
}
}
Output
Price
Syntax
using System;
namespace Compute
{
class Numbers
{
static void Main(string[] args)
{
obj.TotalPrices(10, 69.5);
}
public void TotalPrices()
{
Console.WriteLine("TotalPrice");
}
public void TotalPrices(double Total, double Price)
{
double tp = Total * Price;
Console.WriteLine("Total numbers of items: {0}\nPrice: {1}\nTotal price: {2}", Total, Price, tp);
}
}
}
Output