Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

DisplayAttribute Is not working in Release mode .

I have a model which have the DisplayAttribute but when i tried to read it using reflaction runtime i didn't get though CategoryAttribute is available.

When i run the same code in debug mode by check use shared suntime works fine.

            var display = DestinationTypeModel.GetType().GetTypeInfo().GetProperty(prop.Name).GetCustomAttribute<DisplayAttribute>();
            var cat = DestinationTypeModel.GetType().GetTypeInfo().GetProperty(prop.Name).GetCustomAttribute<CategoryAttribute>();

Any help would be appreciated.

Thanks in advance.


Sign In or Register to comment.