How to get the exact property name while getting error

Posted by Vishalneeraj-24503 under .NET Framework on 8/29/2023 | Points: 10 | Views : 145 | Status : [Member] [MVP] | Replies : 0
Hi All,

How can we get the exact property name in the log file whenever we get any error in dot net application probably Vb.Net?

Suppose there is an ExpiredDate string property is defined in a class and this property we are using inside method.

So suppose ExpiredDate is null and due to this we are getting error in log file so how we can see whether ExpiredDate is causing an issue.

Means ExpiredDate property name should be logged in a log file. So that we can easily trace and rectify the issue.

Note - I am just taking an example of ExpiredDate property, but there could be any property that can cause an issue so those property names should also be shown in the log file.

Please help on this.

Thanks in advance.


(No response found.)

Login to post response