Posts by Leo • 86 points
2 posts
-
7
votes2
answers2197
viewsA: What is the most efficient way to clear a list (List) with C#?
Leave as is, call clear without checking if the list is content. The Clear method already does this check, so re-coding it would make no sense.…
-
0
votes1
answer131
viewsA: Convert strings to boolean
Maybe not the best solution, but you can know if it is a boolean value as follows: var isTrue = (query.e == "true"); //compara com a string "true" e retorna true, caso sejam iguais…