OK got them I'll tell you the rest tomorrow. Goodnight.

Don't know if you will see me a lot today.
Must say you already did a nice job in translating this from C++ to C#.
I tweaked your code a bit and added some comments.
It even compiles and starts up now.
This is how my console screen looks after typing 1 and 2;
I also include the modified files in a zip so you can work further on them.
Any questions, please ask.

//thanks,have a question ,are the parameters list in the rest of the functions ,like withdraw,logement (in switch)should be empty too?

Yes, of course.

A bit confused here:
public static void Lodgement()//List<Account> list)

   //    A bit confused here:
        public static void Lodgement()//List<Account> list)

            Console.WriteLine("Process Logement");
            Console.WriteLine("Enter account name");
            string name = Console.ReadLine();
            Console.WriteLine("Enter logement amount");
          int logementAmount = Console.ReadLine();//??

          list.credit(logementAmount); //???

           //Display ???


This is what I first would come up with:

public static void Lodgement()//List<Account> list)
                Console.WriteLine("Process Lodgement");
                Console.Write("Enter account name: ");
                string name = Console.ReadLine();
                Console.Write("Enter lodgement amount: ");
                double lodgementAmount = Convert.ToDouble(Console.ReadLine());
                int accountIndex = list.FindIndex(x => x.Name == name);
                Console.WriteLine("New balance details:");
            catch (Exception e)
                Console.WriteLine("Exception: {0}", e.Message);

Hope this very much explains itself, except perhaps the lambda expression in FindIndex. As this is a financial application, you could perhaps switch to a decimal type instead of a double type for the amounts.

Thanks,managed to do wihdrawal method too,very similar.Question,values i change exists only,while i run program and once exit and restart,values appears by default harcoded unchanged? Is it supposed to be like this?

Don't know exactlywhat you mean, but values that are typed in are lost when the program finishes, unless you implement some sort of filing.

How different the dynamic cast in c#,try to figure out for interestRate method. And is it possible to change exception to custom message,like account name does not exists for logement method?Thanks

C# has only one cast. If you want to cast a variable to a type you do
In the catch part you can write as many WriteLines as you like.

Thank you.I manged to finish it.
From your file i can see you are interested in maths too.Do you do any algorithms to find prime for instance or cryptology in c#?

Click on my avatar and then on the code snippets link. Several snippets in the list are related to math. Or go directly clicking my snips

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.