Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of VB.NET object list

Shulou Source: shulou.com Published: 2022-06-02 08:51:54 10月01日 Update

Editor to share with you the example analysis of the list of VB.NET objects, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The first step is to create a shared list. You can get data from many sources, but the easiest way is to add it. In the text, we will write code to classify the sets in the example. So, let's talk about the code that creates the set. First, I need an object that represents the bottle in the set. The code written for this is fully standard, and in fact, vb.net 2008 express intellisense will write most of the code for you. Here is a list of my VB.NET objects:

Public class bottle "internalproperties" public property brand () as string public property name () as string public property category () as string public property size () as decimal public sub new (_ end sub end class to create a set I need to add items: dim cabinet as list (of bottle) = _ "new list (of bottle) cabinet.add (new bottle (_" castle creek ", _" uintah blanc ", _" wine ", 750)) cabinet.add (new bottle (_" zion canyon brewing company ", _" springdale amber ale ", _" beer ", 355)) cabinet.add (new bottle (_" spanish valley vineyards ", _" syrah ", _" wine ") Cabinet.add (new bottle (_ "wasatch beers", _ "polygamy porter", _ "beer", 355)) cabinet.add (new bottle (_ "squatters beer", _ "provo girl pilsner", _ "beer", 355))

All of this is standard code in vb.net1.0. However, you need to specify it by defining our own bottle object.

The above is all the content of the article "sample Analysis of VB.NET object list". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Objects code articles examples analysis content most standards for this not much facts in fact representatives multiple data text methods more knowledge industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MySQL Microsoft Apple Xiaomi