Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2005, 04:46 AM
Authorized User
 
Join Date: Apr 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Collections in C#?

Hi all

I am currently moving over from vb.net and have a simple code question. In vb.net you use collections as if they were a datatype something like...

Code:
 
        Private Function LoadCollection() As Collection
            Dim colPrivCol As New Collection 
            colPrivCol.Add(oIPStory, oIPStory.Key)
but in C# I cant get a reference in the same way? I cant create a collection at all? Do I have to use ArrayLists?

thanks for your help.


 
Old August 17th, 2005, 06:16 AM
Authorized User
 
Join Date: Apr 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry Im an idiot figured it out...

Essentially its true I was using collections like that BUT it was referencing the microsoft.visualbasic namespace which has a collection class.

Im using a hashtable instead...





Similar Threads
Thread Thread Starter Forum Replies Last Post
collections help bennyt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 July 26th, 2008 01:30 AM
Collections and Recordsets MLC1985 Beginning VB 6 10 August 1st, 2007 09:13 AM
Collections question GregV VB.NET 2002/2003 Basics 0 August 6th, 2003 12:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.