Page 1 of 1

Lists in VB using JIWA Plugin  Topic is solved

PostPosted: Wed Jun 21, 2017 2:51 pm
by Ernst
Created this bit of code to create and retrieve from a list in a VB JIWA plugin.

Dim ClassList = New System.Collections.Generic.List(Of String) From {"ClassA","ClassB","ClassC","ClassD","ClassE"}

If ClassList.Contains(Salesorder.Debtor.Classification.Description) Then

Those C# boys would have a hard time matching that for ease of use... :)

Re: Lists in VB using JIWA Plugin

PostPosted: Wed Jun 21, 2017 5:59 pm
by Mike.Sheen
Ernst wrote:Those C# boys would have a hard time matching that for ease of use... :)


Actually, the equivalent in C# is less characters:
Code: Select all
var classList = new System.Collections.Generic.List<string>() {"ClassA","ClassB","ClassC","ClassD","ClassE"};
if (classList.Contains(Salesorder.Debtor.Classification.Description))


:P

Re: Lists in VB using JIWA Plugin

PostPosted: Thu Jun 22, 2017 8:51 am
by Scott.Pearce
lol