|
-
Nov 23rd, 2016, 03:05 PM
#5
Thread Starter
Lively Member
Re: Math functions in VB
Thanks. I now have the following:
CODE
Dim textBoxes() As TextBox = {tbAAH, tbCol, tbDE, tbLex, tbUni}
Dim numbers = textBoxes.Where(Function(tb) Integer.TryParse(tb.Text, Nothing)).Select(Function(tb) Integer.Parse(tb.Text))
Dim minNumber = numbers.Min()
CODE
I get the following message:
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Core.dll
Additional information: Sequence contains no elements
So presumably something needs to be put in the brackets after Dim minNumber = numbers.Min(); but what should be in there?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|