Check if a string contains an element from a list (of strings)
For the following block of code: For I = 0 To listOfStrings.Count – 1 If myString.Contains(lstOfStrings.Item(I)) Then Return True End If Next Return … Read more
For the following block of code: For I = 0 To listOfStrings.Count – 1 If myString.Contains(lstOfStrings.Item(I)) Then Return True End If Next Return … Read more
I have some code like this: If key.Equals(“search”, StringComparison.OrdinalIgnoreCase) Then DoSomething() End If I don’t care about the case. Should I use OrdinalIgnoreCase, … Read more
Is there a VB.NET equivalent for C#’s ?? operator? 6 Answers 6
Should you set all the objects to null (Nothing in VB.NET) once you have finished with them? I understand that in .NET it … Read more
In Visual Studio, when you right-click a method call, you go to the implementation of that method inside a class except if you … Read more
I’m trying to wrap my head around which data structures are the most efficient and when / where to use which ones. Now, … Read more
About 6 months ago I rolled out a site where every request needed to be over https. The only way at the time … Read more
Question: I want to define a global exception handler for unhandled exceptions in my console application. In asp.net, one can define one in … Read more
I have the following code: Using cmd As SqlCommand = Connection.CreateCommand cmd.CommandText = “UPDATE someTable SET Value = @Value” cmd.CommandText &= ” WHERE … Read more
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so … Read more