public int StoreData(AccDetails accDetails) { int accNo = accDetails.Accno; if (accNo > 10) { d = accNo; return(d); } else { d = accNo + 10; return(d); } }
public static void Main(string[] args) { AccBusiness obj = new AccBusiness(); AccDetails accDetails = new AccDetails { Accno = Convert.ToInt32(Console.ReadLine()), Acctype = Console.ReadLine(), debit = Convert.ToInt32(Console.ReadLine()), pin = Convert.ToInt32(Console.ReadLine()), }; //int accNo = Convert.ToInt32(Console.ReadLine()); obj.StoreData(accDetails); obj.showData(accDetails); Console.ReadKey(); }
public void showData(AccDetails accDetails) { Console.WriteLine("{0}", accDetails.Accno); }