Does GetType() or GetProperty() or GetValue() needs pdb file for working in the published website?

StackOverflow https://stackoverflow.com/questions/21348820

Question

In a MVC project, I am using the gettype(), getproperty and getvalue() from System.Reflection. If I publish this website, does these methods need pdb file ?

Was it helpful?

Solution

Nope these methods do not need pdb file. Assemblies themselves contain that information. See below from msdn.

Assemblies contain modules, modules contain types, and types contain members. Reflection provides objects that encapsulate assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object. You can then invoke the type's methods or access its fields and properties.

You can read this link to better understand reflection: http://msdn.microsoft.com/en-us/library/f7ykdhsy.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top