using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ARMSBOLAYER { public class Country { private int m_CountryID; private string m_CountryCode; private string m_CountryName; public int StateID { get { return m_CountryID; } set { m_CountryID = value; } } public string StateCode { get { return m_CountryCode; } set { m_CountryCode = value; } } public string StateName { get { return m_CountryName; } set { m_CountryName = value; } } public Country() { m_CountryID = 0; m_CountryCode = ""; m_CountryName = ""; } public Country(string sCountryID, string sCountryCode, string sCountryName) { this.CountryID = sCountryID; this.CountryCode = sCountryCode; this.CountryName = sCountryName; } ~Country() { } public void Print() { StreamWriter objPrinterFile = new StreamWriter("Network_Printer.txt", true); objPrinterFile.WriteLine("Country CountryID = {0}", m_CountryID); objPrinterFile.WriteLine("Country CountryCode = {0}", m_CountryCode); objPrinterFile.WriteLine("Country CountryName = {0}", m_CountryName); objPrinterFile.WriteLine(); objPrinterFile.WriteLine(); objPrinterFile.Close(); } } } Please fix this code and complete this code using
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ARMSBOLAYER
{
public class Country
{
private int m_CountryID;
private string m_CountryCode;
private string m_CountryName;
public int StateID
{
get { return m_CountryID; }
set { m_CountryID = value; }
}
public string StateCode
{
get { return m_CountryCode; }
set { m_CountryCode = value; }
}
public string StateName
{
get { return m_CountryName; }
set { m_CountryName = value; }
}
public Country()
{
m_CountryID = 0;
m_CountryCode = "";
m_CountryName = "";
}
public Country(string sCountryID, string sCountryCode, string sCountryName)
{
this.CountryID = sCountryID;
this.CountryCode = sCountryCode;
this.CountryName = sCountryName;
}
~Country()
{
}
public void Print()
{
StreamWriter objPrinterFile = new StreamWriter("Network_Printer.txt", true);
objPrinterFile.WriteLine("Country CountryID = {0}", m_CountryID);
objPrinterFile.WriteLine("Country CountryCode = {0}", m_CountryCode);
objPrinterFile.WriteLine("Country CountryName = {0}", m_CountryName);
objPrinterFile.WriteLine();
objPrinterFile.WriteLine();
objPrinterFile.Close();
}
}
}
Please fix this code and complete this code using c#
Step by step
Solved in 2 steps with 1 images