Lists in VB using JIWA Plugin  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Lists in VB using JIWA Plugin  Topic is solved

Postby Ernst » Wed Jun 21, 2017 2:51 pm

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... :)
User avatar
Ernst
Kohai
Kohai
 
Posts: 221
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Lists in VB using JIWA Plugin

Postby Mike.Sheen » Wed Jun 21, 2017 5:59 pm

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Lists in VB using JIWA Plugin

Postby Scott.Pearce » Thu Jun 22, 2017 8:51 am

lol
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 743
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 8 guests