I thought this would work fine, loading the entire database table into a list, and then use Linq to grab the matches into another list.
I've never used where and or, this is the first time plus I have contains, thought I got it right.
Dim customers As List(Of model_customer_index) = everything.Where(Function(a) a.FCUSTNO.Contains(pValue) Or a.FCOMPANY.Contains(pValue)).ToList()
That depends on where you're executing the query, and is one of the more annoying quirks of LINQ.
If you're querying an in-memory list, string comparisons are case-sensitive by default. You can either "normalize" the strings using ToUpper / ToLower(you should prefer upper-case[^], due to the "Turkish I" problem[^]), or you could use IndexOf and pass a case-insensitive StringComparison. (Annoyingly, there isn't an overload of Contains which takes a StringComparison option.)
Passing a StringComparison option is preferable to changing the case, because it doesn't involve creating a new copy of the string.
If you're using a database, your query will use the collation[^] for the column you're querying. Most databases use a case-insensitive collation by default, so your query will be case-insensitive.
If you try to pass a StringComparison when you're querying a database, you'll get an exception telling you that the method can't be converted to a database query.
Not that this is a leaky abstraction or anything!
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
i was looking for a snippet to control the line in volume of my machine, but i found nothing usefull!
Could you guys gimme some help?
I am trying to create a simple sound recording software..just to keep busy..
no problem for the slider..i need the code to control the line in volume..thats what i need!!
i have searched but only returns code to control the main volume, not line in...
i find no snippet for the line in volume control!
i already saw this article...but i cannot recreate it on Visual Basic...
I would like to have the "line in " slider represented there in the "Recordings" section..
but i do not know where to start from..i have seen the code to record .wav from the line in input of my PC..it is recording fine enough for me... i just wish to have a way to adjust the recording volume!!!