0

So I have these classes (excluding main) public BankAccount, public static Bank So I want to have a static list of all of the account that can only be read or edited by the classes above

In main I should only be able to create accounts and deposit or withdraw money from them?

How do I do it?

I don't have a prototype so you'll have to work with your imagination.

LarsTech
  • 80,625
  • 14
  • 153
  • 225
kamberoFF
  • 1
  • 1
  • I'd recommend looking at Microsoft's documentation on access modifiers https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers – Josh Heaps Jun 19 '23 at 22:14
  • C#/.NET doesn't have C++'s notion of `friend` accessibility - the closest equivalent is `internal`. That said, what are you _really_ trying to accomplish - or is this just a learning-exercise? – Dai Jun 19 '23 at 22:21
  • It's just a learning exercise from my school. Obviously they aren't asking for something complex like this (for me). – kamberoFF Jun 19 '23 at 22:27

0 Answers0