In my opinion a Struct is a poor man's class.  I have never seen any
justification for using them, maybe somebody could enlighten me.

Why would you want to write something that was not extensible.  I know it is
a value type but is the overhead worth the symantic sacrifice?



[EMAIL PROTECTED]





From: Girish Jain <[EMAIL PROTECTED]>
Reply-To: "Discussion of advanced .NET topics."
<ADVANCED-DOTNET@DISCUSS.DEVELOP.COM>
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] New Type decision Criterias
Date: Thu, 12 Jan 2006 10:13:30 +0000

Hi All,

I have to read a fixed length file which has about 52000 entries and store
these entries into a database table. I have created a new type and it has
properties which are mapped to the columns in the file. I have created a
collection class to store all the instances. The collection class inherits
from the CollectionBase class. Therefore, internally I am adding all the
instances to the ArrayList.

I am just thinking about whether I should be creating the new type as a
struct or a class i.e. value type or reference type. I am asking this just
to check on the performance as it has very large number of entries in it.
The type has some 19 fields out of which 2 are DateTime, 2 integers and one
char, and rest are string values.

Kindly suggest


Thanks in advance,

Regards,
Girish Jain

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to