var types = Assembly.GetExecutingAssembly().GetTypes().Where(t => String.Equals(t.Namespace, "SomeNamespace", StringComparison.Ordinal)).ToArray();
foreach (Type T in types)
{
//Neither of these will work
var foo = Activator.CreateInstance(typeof(`What would I put...
Hi,
I need some guidance regarding the problem I am facing.
PROBLEM:
I am currently working on MinIO object storage (similar to Azure Blob and AWS S3) and I am currently trying to implement a method which will download the files uploaded in my local cloud storage.
For that I want to create a...
Public class viewmodel
{
public string ID {get;set;}
public String name{get;set;}
public List<child1>{get;set;}
}
public class child1
{
public string C1ID {get;set;}
public String C1name{get;set;}
public List<child2>{get;set;}
}
public...
I am in a difficulty to convert a List that is class object which populated from database, so far so good to have that list of object but I need its string[,] (2D) array as converted to apply a method which helps to get an print output.
private void dateTimePicker1_ValueChanged(object sender...
Hello :joyous:,
I am doing C# for a half year now. Today I want to call a method like this in a class with the name "A":
public T TheMethod<T>(IRestResponse response) {
...
}
At compile time, T isn't known.
var theType = typeof(B);
So I tried the following:
var gMethod=...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.