Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Getters

Victor Ghost edited this page Jun 19, 2022 · 5 revisions

GetUserName()

This Function Don't Receive Any parameter

This Function returns the name of the User

example how use it

namespace BankSystem
{
    class Program
    {
        static void Main(string[] args)
        {
            User user1 = new User("User Name", 1, 0.0); // will create the var "user1" with name "User Name", With the account number "1" and "0.0" of balance
            Console.WriteLine(user1.GetUserName());
        }

GetUserBalance()

This Function Don't Receive Any parameter

This Function returns the balance of the User

example how use it

namespace BankSystem
{
    class Program
    {
        static void Main(string[] args)
        {
            User user1 = new User("User Name", 1, 0.0); // will create the var "user1" with name "User Name", With the account number "1" and "0.0" of balance
            Console.WriteLine(user1.GetUserBalance());
        }
Clone this wiki locally