How I can return null in the string if my {condition} is false. I'm using string interpolation with the conditional operator.
string returnURL = $"{ condition ? (ConfigurationManager.AppSettings["ApplicationURL"]}/my-page/{trip?.TripUId }) : null"
Use like this
bool flag = true;
string returnUrl = flag ? $"{ConfigurationManager.AppSettings["ApplicationURL"]}/my-page{trip?.TripUid}" : null;