c# mapping parameters to class instance properties
While it's not exactly what you're asking for, there are tools that can generate the constructor code for you so you don't have to write it out yourself (example). You can also create your own generator.
More in line with your question, I don't know of an existing solution, but you might be able to create your own solution using reflection. Here are some resources that may or may not help with that. At the very least it should give you an idea of the types of things you would want to search for.
http://stackoverflow.com/questions/214086/how-can-you-get-the-names-of-method-parameters
http://stackoverflow.com/questions/737151/how-to-get-the-list-of-properties-of-a-class
http://stackoverflow.com/questions/619767/set-object-property-using-reflection
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now