G
Guest
Hi
Im a relative newbie to the .NET CF and am writing in VB.NET
I have a class (class A) that could hold a potential of 15 different classes in its "data" member field. I have added a field called "dataobjectname" which I set whenever I add the data member. Whenever I look to call the "convertToBytes" of on class A I read the "dataobjectname" and cast the object accordingly and call its "convertToBytes" member method
I looking to optimise my code and thought that Id replace the field "String - dataobjectname" with "Int16 - dataobjectname" and use an enumeration list" before casting.
Will this reduce the amount of memory used in my application? Will there be performance improvements
E.
Class
..
..
Dim data As Object ' Can hold any 1 of 15 different objects
Dim dataobjectname As String
Im open to suggesting in case anyone knows of how to do away with the dataobjectname field altogether so that I save even more memory whilst my app is running
Im a relative newbie to the .NET CF and am writing in VB.NET
I have a class (class A) that could hold a potential of 15 different classes in its "data" member field. I have added a field called "dataobjectname" which I set whenever I add the data member. Whenever I look to call the "convertToBytes" of on class A I read the "dataobjectname" and cast the object accordingly and call its "convertToBytes" member method
I looking to optimise my code and thought that Id replace the field "String - dataobjectname" with "Int16 - dataobjectname" and use an enumeration list" before casting.
Will this reduce the amount of memory used in my application? Will there be performance improvements
E.
Class
..
..
Dim data As Object ' Can hold any 1 of 15 different objects
Dim dataobjectname As String
Im open to suggesting in case anyone knows of how to do away with the dataobjectname field altogether so that I save even more memory whilst my app is running