Click here to Skip to main content
15,889,216 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Sort methodes idees wanted Pin
JR21221-Oct-14 0:29
JR21221-Oct-14 0:29 
GeneralRe: Sort methodes idees wanted Pin
Manfred Rudolf Bihy21-Oct-14 0:52
professionalManfred Rudolf Bihy21-Oct-14 0:52 
QuestionHelp needed creating a form based on a vbscript Pin
Malbordio19-Oct-14 6:25
Malbordio19-Oct-14 6:25 
AnswerRe: Help needed creating a form based on a vbscript Pin
Dave Kreskowiak23-Oct-14 10:00
mveDave Kreskowiak23-Oct-14 10:00 
Questionhow to open password protected .pdf file in vb 6.0 Pin
kirtitripathy17-Oct-14 21:25
kirtitripathy17-Oct-14 21:25 
AnswerRe: how to open password protected .pdf file in vb 6.0 Pin
Dave Kreskowiak18-Oct-14 4:34
mveDave Kreskowiak18-Oct-14 4:34 
QuestionHow to search in a List (of structure) Pin
dilkonika14-Oct-14 4:52
dilkonika14-Oct-14 4:52 
AnswerRe: How to search in a List (of structure) Pin
Eddy Vluggen14-Oct-14 5:39
professionalEddy Vluggen14-Oct-14 5:39 
dilkonika wrote:
should I iterate through all the item with a for loop
Yup. Or use LINQ, which also iterates the collection;

VB.NET
Module Module1
    Public Structure Mystruct
        Property id As Integer
        Property name As String
        Property value As Integer
    End Structure

    Dim lst As New List(Of Mystruct)

    Sub Main()
        lst.Add(New Mystruct() With {.id = 1, .name = "hello", .value = 2})
        lst.Add(New Mystruct() With {.id = 5, .name = "test", .value = 5})
        lst.Add(New Mystruct() With {.id = 5, .name = "world", .value = 9})

        Dim lstFound As List(Of Mystruct) = lst.Where(Function(i As Mystruct) i.id = 5 AndAlso i.value < 7).ToList()

        For Each item As Mystruct In lstFound
            Console.WriteLine(item.name)
        Next

        Console.ReadKey()
    End Sub
End Module

Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

QuestionVBScript Connect to Database across Internet Pin
JM7613-Oct-14 4:22
JM7613-Oct-14 4:22 
AnswerRe: VBScript Connect to Database across Internet Pin
Eddy Vluggen13-Oct-14 7:34
professionalEddy Vluggen13-Oct-14 7:34 
GeneralRe: VBScript Connect to Database across Internet Pin
JM7613-Oct-14 7:39
JM7613-Oct-14 7:39 
GeneralRe: VBScript Connect to Database across Internet Pin
Eddy Vluggen13-Oct-14 8:23
professionalEddy Vluggen13-Oct-14 8:23 
GeneralRe: VBScript Connect to Database across Internet Pin
JM7613-Oct-14 9:12
JM7613-Oct-14 9:12 
GeneralRe: VBScript Connect to Database across Internet Pin
Eddy Vluggen13-Oct-14 10:42
professionalEddy Vluggen13-Oct-14 10:42 
AnswerRe: VBScript Connect to Database across Internet Pin
Bernhard Hiller19-Oct-14 22:42
Bernhard Hiller19-Oct-14 22:42 
GeneralRe: VBScript Connect to Database across Internet Pin
JM7620-Oct-14 6:09
JM7620-Oct-14 6:09 
QuestionBind a listbox to a list of structure Pin
dilkonika11-Oct-14 8:40
dilkonika11-Oct-14 8:40 
AnswerRe: Bind a listbox to a list of structure Pin
Mycroft Holmes11-Oct-14 15:33
professionalMycroft Holmes11-Oct-14 15:33 
QuestionAdd Open with functionality to vb6.0 application Pin
Otekpo Emmanuel10-Oct-14 6:49
Otekpo Emmanuel10-Oct-14 6:49 
AnswerRe: Add Open with functionality to vb6.0 application Pin
CHill6010-Oct-14 6:55
mveCHill6010-Oct-14 6:55 
AnswerRe: Add Open with functionality to vb6.0 application Pin
Eddy Vluggen10-Oct-14 7:59
professionalEddy Vluggen10-Oct-14 7:59 
GeneralRe: Add Open with functionality to vb6.0 application Pin
ZurdoDev10-Oct-14 9:00
professionalZurdoDev10-Oct-14 9:00 
AnswerRe: Add Open with functionality to vb6.0 application Pin
Eddy Vluggen10-Oct-14 9:44
professionalEddy Vluggen10-Oct-14 9:44 
GeneralRe: Add Open with functionality to vb6.0 application Pin
ZurdoDev10-Oct-14 9:54
professionalZurdoDev10-Oct-14 9:54 
GeneralRe: Add Open with functionality to vb6.0 application Pin
Eddy Vluggen10-Oct-14 10:28
professionalEddy Vluggen10-Oct-14 10:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.