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

VS 2010 [RESOLVED] Count number of object instances in a list

$
0
0
Hi,

Is there an easier, or cleaner, way to count the number of object in a list than:

Code:

For Each bk As Book In bookList
                    If TypeOf bk Is ChildrensBook Then
                        count += 1
                    End If
                Next

All help appreciated,

Thanks.

Viewing all articles
Browse latest Browse all 27349

Trending Articles



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