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

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

문제

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 ?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top