Skip to content
Permalink
0789231091
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (27 sloc) 783 Bytes

using System;
using System.Collections.Generic;
using System.Text;
// You'll often see that programmers break their code into multiple files
// So long as the files are all held in the same namespace, they're accessible
// to the rest of your program with no extra work.
namespace VehicleInventory
{
// Declare a class called car
class Car
{
// Set properties
public string InventoryNumber;
public double Year;
public string Make;
public string Model;
public double Mileage;
public decimal Price;
// Declare a method to get vehicle details
public string GetDetails()
{
// String interpolation to describe the vehicle
return $"{InventoryNumber} - {Year} {Make} {Model} - {Mileage} miles - {Price.ToString("C")}";
}
}
}