I am reflecting a DLL. The first part works fine:
System.Type typeImageInfo= assembly.GetType("MyNameSpace.ImageInfo");
var imageInfo= System.Activator.CreateInstance(typeImageInfo);
MethodInfo myMethod = typeYouTube.GetMethod("GetImageInfo");
var ImageData= myMethod.Invoke(imageInfo, new object[] { "https://www.website.com/image.png" });
I know the code works because with Debug I can see imageData
get filled with the proper information.
Now the ImageData class contains a function:
public string GetUri(Func<DelegatingClient> makeClient);
Which i don't know how to access. If it was not a reflection of the DLL, but calling it directly, I would just do:
string imageURL= ImageData.GetUri();
How would I invoke the GetUri() method with reflection from ImageData
?