How do I get the subclass Type object in a static superclass function in .net, using reflection?
问题 Ok, so I'm trying to make a nice superclass for data-access objects that can generate a tsql query to search all of the subclass's public string properties. I want to use reflection to get the type of the subclass and then iterate through all of the public string properties on the object, since those property names are the same as the database column names. Then I can use those property names to generate a tsql query. [caveat: hey, id rather use nhibernate but no way I could convince these