Reputation:
I have been doing the following:
if (json.RowKeyNew != "") {
updateGridMeta(entity, json.PartitionKey, json.RowKeyNew, row, tab);
}
However if the json.RowKeyNew is null then the if condition is met which is not what I want. How can I check for something that is not null and not "" ?
Upvotes: 0
Views: 401
Reputation: 1380
if (json.RowKeyNew)
just put varible in if condition it return true if having some value else return false
Upvotes: 0
Reputation: 26756
Try...
if (json.RowKeyNew) {
updateGridMeta(entity, json.PartitionKey, json.RowKeyNew, row, tab);
}
Upvotes: 0