seguimos 
error de resolucion de sobre carga pongo codigo entero
Luis

error de resolucion de sobre carga pongo codigo entero
Código [Seleccionar]
Public Class Form1
Dim XMax As Short = 99
Dim Xmin As Short = 0
Dim x As Integer = 0
Dim Número As Double
Private TextBoxes As TextBox() = {Nothing}
Private Result1 As Int32(), Result2 As Int32(), Result3 As Int32()
Private _textBox As Object
Private _getNumbersNotInRange As Object
Private Property ListBox1Count As Integer
ReadOnly MAX As Integer = 99
Private Property Calcular As Object
Private Property TextBox(ByVal TextBoxCount As Short) As Object
Get
Return _textBox
End Get
Set(ByVal value As Object)
_textBox = value
End Set
End Property
ReadOnly Property Num1 As Int32
Get
Return CInt(TextBox1.Text)
End Get
End Property
ReadOnly Property Num2 As Int32
Get
Return CInt(TextBox2.Text)
End Get
End Property
ReadOnly Property Num3 As Int32
Get
Return CInt(TextBox3.Text)
End Get
End Property
Private Property GetNumbersNotInRange(ByVal Result11 As IEnumerable(Of Integer), ByVal Xmin As Integer, ByVal XMax As Integer) As Object
Get
Return _getNumbersNotInRange
End Get
Set(ByVal value As Object)
_getNumbersNotInRange = value
End Set
End Property
Private Sub Sumar(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Result1 = {Num1 + 10, Num1 + 20, Num1 + 30} _
.Distinct().ToArray ' Elimino duplicados
Result2 = {Num2 + 10, Num2 + 20, Num2 + 30} _
.Distinct().ToArray ' Elimino duplicados
Result3 = {Num3 + 10, Num3 + 20, Num3 + 30} _
.Distinct().ToArray ' Elimino duplicados
' primero concatenas y eliminas duplicados en el primer array:
Dim Result11 As IEnumerable(Of Integer) =
(Result1.Concat(Result2).Concat(Result3).
Distinct)
' luego instancias un segundo array que obtiene los números que no están dentro del rango 'Xmin'-'Xmax' del primer array:
Dim NumbersNotInRange As Integer() =
GetNumbersNotInRange(Result11, Xmin, XMax).ToArray
' Y por último reemplazas los números que no están en el rango, en el primer array:
Result11 = Result11.Select(Function(Value As Integer) If(Value < MAX, Value, Rand.Next(0, MAX))) <----------------------aca
' y los añades a los listbox:
ListBox1.Items.AddRange(Result11.Cast(Of Object).ToArray)
ListBox2.Items.AddRange(NumbersNotInRange.Cast(Of Object).ToArray)
End Sub
End Class
Luis