(dr.Field<string>("gst_name") ?? String.Empty).Trim()......
?
>UPDATE. Never mind, solved it.
>
>Hi everybody,
>
>Just wondering if there is some simple syntax here to avoid the error.
>
>I have this expression:
>
>
>display_message = row.Field<String>("Request") + row.Field<String>("PaidStatus") +
> row.Field<String>("gst_name").Trim().Proper() + " " +
> row.Field<String>("lsndescrip").Trim() + " " + Convert.ToString(row.Field<Decimal>("booking_id"));
>
>and right now it's failing because gst_name column is null.
>
>I'm wondering what is the simplest way to re-write this expression to treat null as empty string?
>
>Thanks in advance.