Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27351

VS 2012 Syntax for adding object attributes

$
0
0
Which of the following code statements is the better to use:

Code:

        For Each ZipArchiveEntryObject As ZipArchiveEntry In ListOfPackageContents
            PackageItemForList = New PackageItem
            PackageItemForList.FilePath = PackageObjectFolderName & ZipArchiveEntryObject.FullName
            PackageItemForList.Type = GetPackageItemType(PackageObjectFolderName & ZipArchiveEntryObject.FullName)
            ListOfPackageItems.Add(PackageItemForList)
        Next

Code:

        For Each ZipArchiveEntryObject As ZipArchiveEntry In ListOfPackageContents
            PackageItemForList = New PackageItem
            PackageItemForList.FilePath = PackageObjectFolderName & ZipArchiveEntryObject.FullName
            PackageItemForList.Type = GetPackageItemType(PackageItemForList.FilePath)
            ListOfPackageItems.Add(PackageItemForList)
        Next

The difference is in the line:

Code:

PackageItemForList.Type =

Viewing all articles
Browse latest Browse all 27351

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>