maybe my question is totally stupit but I'm trying to do my best.
All I want to do is to use a function/property of a parent element.
I have prepared a simple example with no sense:
class A
{
public List<B> myBs = new List<B>();
public int CountMyBs()
{
return myBs.Count;
}
}
class B
{
//here i would like to use "CountMyBs()"
}
Thank you!
Edit: I think I have to provide you some more information.
My user is able to drag a value to a canvas. My canvas is in a list of a parent class. Now my canvas wants to know if any other canvas in the list has already the same value.
My idea of realizing:
User does a drag --> Canvas gets an event --> Canvas ask parent class if any other Canvas has already the same value --> decide what to do.
I will post a mor detailed example tomorrow!