How Can I By Pass If Object reference not set to an instance of an object

Hi Guys,

I need to bypass this error ;

Write Line: Object reference not set to an instance of an object.

I create If build but its not working how can ı skip this error.

maybe the tostring is not needed and String.IsNullOrEmpty can already cover it
Otherwise we can do

IsNothing(mails_data) OrElse String.IsNullOrEmpty(mails_data.toString.Trim)

@burakavuncu Can you share that error screenshot

image

Error screenshot

mails_data variable type : Object , how can I write it for object type variable ?

as mentioned above

@burakavuncu Can you change the type to string instead of object and try once

2 Likes

It works mate, thank you so much ^^

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.