Re: C# Struct vs Class
- From: "Gabriel Lozano-Morán" <abuse@xxxxxxxxxxxxxxx>
- Date: Mon, 4 Dec 2006 22:04:11 +0100
Are these value types referenced by a reference type?
Gabriel Lozano-Morán
"Hafiz" <hafizur.rahman@xxxxxxxxx> wrote in message
news:1164432250.894043.40170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I have used in my program a class which is similar like this
class test {
int i;
int j;
int k;
}
When I create object of this type e.g 1000 copy or something for every
object it takes 20 byte of memory. to reduce the memory size I have
redeclared this in struct
like
struct test{
int i;
int j;
int k;
}
What i am seeing using profiling tool struct in C# also taking 20 byte
of memory which is same as class declaration.
This solution is very much urgent as i have to reduce the memory size ?
it is highly appreciateble if any of you have this solution.
regards,
.
- Prev by Date: Re: Diagnosing Application Hang...
- Next by Date: Re: C# vs C
- Previous by thread: Re: C# Struct vs Class
- Next by thread: Com+ vs IIS vs StandAlone
- Index(es):
Relevant Pages
|
Loading