Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Coalesces the specified strings.
- /// Example:
- /// string result = Coalesce(s.SiteNumber, s.AltSiteNumber, "No Number");
- /// </summary>
- /// <param name="strings">The strings.</param>
- /// <returns></returns>
- private static string Coalesce(params string[] strings)
- {
- return strings.Where(s => !s.IsNullOrEmpty()).FirstOrDefault();
- }
Advertisement
Add Comment
Please, Sign In to add comment