✅ Accsessing Method in another class by object
I have a customer class which contains the method I want to access
I want to call that method in my program.cs inside my
foreach
It is supposed to search for customers with the written name
Thanks beforehand 🙂7 Replies
item.GetAllVichles()
probablywth is a vichle...? ![Hmm](https://cdn.discordapp.com/emojis/965716034432696380.png)
![Hmm](https://cdn.discordapp.com/emojis/965716034432696380.png)
![](https://utfs.io/f/fe9e955a-a3fd-42fe-afcb-143abaa5f539-1nq2cb.png)
Well, what class is
GetAllVichles()
a method of?
Because you'll need an instance of that classBase of Vehicle
Oof, you are right. I am making no instance for the class
This is what I had to do
Closed!