score:3
Accepted answer
Make use of : ?? Operator
try this below code
contactTable.Select(c => ( (( c.Title ?? "") + " " + c.FirstName).Trim()).ToList();
Source: stackoverflow.com
Related Query
- Dealing with a null column in LINQ while concatenate to a string
- How to concat strings in LINQ while properly dealing with NULL values
- Joining two tables with LINQ while also returning null records from the second table
- Linq to SQL: Where clause comparing a Nullable<DateTime> with a SQL datetime null column
- Concatenate All Properties to a String with LINQ
- LINQ String comparison with NULL handling
- datatable replace zero with null or empty string via linq
- LINQ - Accessing a column with the column name as a string parameter
- Ordering column values with LINQ ignoring empty string values
- Getting all elements concatenate in a string with LINQ
- Exclude null values while summation by specific column in a left joined table using LINQ
- LINQ and C# - Dealing with a potentially null parameter
- How to merge two lists while adding metadata indicating value source with LINQ statement?
- Convert string to decimal within LINQ Average function while handling possible null values
- Concatenate collection of XML tags to string with LINQ
- Dealing with a null datetime element within xml using linq
- Using LINQ to populate a string with a single column value
- Linq with multiple columns while doing a trim() on a column
- LINQ to get distinct column value with count of a string
- How to replace null with Empty string in Expressions.Expression in c# Linq
- return one string with multiple column value linq
- Getting all elements while using group by on string column using LINQ
- How can I query a database with LINQ when the column is a number but I have a string in the WHERE?
- Unexpected result while generating string with Aggregate() in linq
- Compare input double with datatable string column values within a range using between query(SQL query to Linq on datatable c# )
- How to run linq query with select when a primary key column returns null and thus the related attribute is null
- LINQ and column with Null
- Projecting object with LINQ to XML but want empty string instead of NULL
- order by string (as the column name) with linq query
- How to convert Null to String with Linq to Entity
More Query from same tag
- Sort XML document based on grandchild
- Get list of certain field back
- Unexpected Linq OrderBy
- Composite iteration failure (.net)
- LINQ - NHibernate: one list items contains all other list items
- Using Linq in MVVM Cross Bind Statements
- Apply method to all elements in enumerable with LINQ
- LinQ - Error when trying to order by child property
- Can I cache partially-executed LINQ queries?
- Linq: Getting a List<String> from List<Customer> based on customer.name
- How to solve issue "Could not translate expression ...into SQL and could not treat it as a local expression."
- C# Linq - Add Null Values and Week Numbers to a List when they are missing
- How to rotate data by converting rows to columns using LINQ
- Looping through a List<T> in batches while ensuring items per batch are unique
- using linq to find if a text field contains any string in a list
- LINQ query to order elements between two variables
- Return null for FirstOrDefault() on empty IEnumerable<int>?
- Retrieving strongly typed Property names using Expression Trees
- Importing xml file to datagridview using linq to XML. data not displaying correctly
- Query Xml from SQL using Entity Framework Database First
- Get distinct list of choices from a multiple choice field's data?
- Anonymous Type, and the great unknown
- Dynamically evaluating string conditions in C#
- LINQ does not recognize joined table in select clause
- Need to convert SQL Query to LINQ
- filter data based on day, week and month
- LINQ to Entities query generating odd error
- Using LINQ for CSV data
- Typescript Array prototype with generics and predicate and allow type to be inferred
- How to combine two flat lists into one nested object