Click here to Skip to main content
15,883,770 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionIs there any field limitaion in Structure (VB.NET) Pin
Michael Sync10-Jun-08 21:10
Michael Sync10-Jun-08 21:10 
AnswerRe: Is there any field limitaion in Structure (VB.NET) Pin
Chinners10-Jun-08 22:41
Chinners10-Jun-08 22:41 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Michael Sync10-Jun-08 23:23
Michael Sync10-Jun-08 23:23 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Chinners10-Jun-08 23:56
Chinners10-Jun-08 23:56 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Michael Sync11-Jun-08 4:52
Michael Sync11-Jun-08 4:52 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Chinners11-Jun-08 5:31
Chinners11-Jun-08 5:31 
GeneralRe: Is there any field limitaion in Structure (VB.NET) Pin
Michael Sync11-Jun-08 15:57
Michael Sync11-Jun-08 15:57 
AnswerRe: Is there any field limitaion in Structure (VB.NET) Pin
Colin Angus Mackay10-Jun-08 23:03
Colin Angus Mackay10-Jun-08 23:03 
Michael Sync wrote:
The problem is that it's not possible to include more than 59 fields or 60 field in one structure. Due to some many reason, she said that she need to include more 60 fields in that structure. So, I suggested her to use a class with "public shared" instead of structure. but I wanna know why we can't have more than 59 fields or 60 field in one structure?


I wasn't aware of the limitation on a structure. However, it seems a sensible thing. Structures are value types and are copied any time they are assigned or passed into a method and so on. Because of all that copying it makes sense to keep the size of the structure small (I think 16 or 32 bytes is a reasonable maximum).

Classes are reference types and only the reference is copied which means the data isn't copied unless you explicity copy it.

I would recommend that creating a class for this data is a better option than a structure.


AnswerRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay10-Jun-08 23:05
Colin Angus Mackay10-Jun-08 23:05 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync10-Jun-08 23:21
Michael Sync10-Jun-08 23:21 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay11-Jun-08 0:43
Colin Angus Mackay11-Jun-08 0:43 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync11-Jun-08 4:53
Michael Sync11-Jun-08 4:53 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay11-Jun-08 13:41
Colin Angus Mackay11-Jun-08 13:41 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync11-Jun-08 15:54
Michael Sync11-Jun-08 15:54 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Colin Angus Mackay11-Jun-08 21:12
Colin Angus Mackay11-Jun-08 21:12 
GeneralRe: Is there any field limitaion in Structure (VB.NET) [more] Pin
Michael Sync11-Jun-08 21:22
Michael Sync11-Jun-08 21:22 
QuestionReflection issue Pin
cstrader23210-Jun-08 13:09
cstrader23210-Jun-08 13:09 
QuestionGetting DataTable to clean XML to send over a socket Pin
Noctris10-Jun-08 12:18
Noctris10-Jun-08 12:18 
AnswerRe: Getting DataTable to clean XML to send over a socket Pin
Mycroft Holmes10-Jun-08 15:29
professionalMycroft Holmes10-Jun-08 15:29 
AnswerRe: Getting DataTable to clean XML to send over a socket Pin
BDEz (Member 3919223)12-Jun-08 7:27
BDEz (Member 3919223)12-Jun-08 7:27 
QuestionHow to Load an HTML Page From Resources File? Pin
Saul Johnson10-Jun-08 7:23
Saul Johnson10-Jun-08 7:23 
AnswerRe: How to Load an HTML Page From Resources File? Pin
jzonthemtn10-Jun-08 8:04
jzonthemtn10-Jun-08 8:04 
GeneralRe: How to Load an HTML Page From Resources File? Pin
Saul Johnson10-Jun-08 20:31
Saul Johnson10-Jun-08 20:31 
AnswerRe: How to Load an HTML Page From Resources File? Pin
BDEz (Member 3919223)12-Jun-08 7:49
BDEz (Member 3919223)12-Jun-08 7:49 
AnswerRe: How to Load an HTML Page From Resources File? Pin
Kenny McKee30-Jun-08 9:12
Kenny McKee30-Jun-08 9:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.