Anybody can think of a way of finding the instance of a class inside the code so it's available to use? (Without having it's reference for start)
class FindMeClass
{
internal FindMeClass()
{
Console.WriteLine("FindMeClass()");
}
~FindMeClass()
{
Console.WriteLine("~FindMeClass()");
}
}
static void FindMe()
{
new FindMeClass();
// Find the class here
GC.Collect();
GC.WaitForPendingFinalizers();
}