77 919
Assignments Done
Successfully Done
In August 2019

Answer to Question #48752 in C# for Julio Diaz

Question #48752
You are writing code for a KINKOS class. The KINKOS class contains the name and
price of a product. You need to override the base class (System.Object) method ToString
to provide information about the objects of the KINKOS class to the calling code. What
code do you need to write in order to meet this requirement?
Expert's answer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace quest48752
class Program
class KINKOS
public string Name { get; set; }
public int Price { get; set; }
public override string ToString()
return "Name: " + Name + " Price of product : " + Price;
static void Main(string[] args)
Console.Write("Enter the name : ");
string name = Console.ReadLine();
Console.Write("Enter the price of prodect : ");
int price = Convert.ToInt32( Console.ReadLine() );
KINKOS kinkos = new KINKOS { Name = name, Price = price };

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions