473,498 Members | 310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory uses of Guid and string

Hi,

I have a Guid value. I want to save this inside the memory.
What is the best way: save it as a Guid? Or as string?

Thanks!
Nov 17 '05 #1
1 4069
Nicholas Paldino [.NET/C# MVP] wrote:
Arjen,

As a Guid. You can always get a string representation by calling
ToString on the Guid parameter. If you can get type safety, take it.
In this case, there is a clear object representation for a Guid, so
you should use that.

Hope this helps.


plus, a Guid probably uses integer types to store (parts of) the value,
which is much more compact (128 bits) than the string representation
(36 x 16 bits = 576 bits). But of course this will only really matter
if you store lots of them, what is 56 bytes nowadays?
Hans Kesting


"Arjen" <bo*****@hotmail.com> wrote in message
news:dc**********@news5.zwoll1.ov.home.nl...
Hi,

I have a Guid value. I want to save this inside the memory.
What is the best way: save it as a Guid? Or as string?

Thanks!

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
2345
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
5
6319
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
1
9113
by: Scott M. Lyon | last post by:
I've got a stored procedure that takes a few parameters as input parameters, and one output parameter (a uniqueidentifier). After the stored procedure call, I need to return that output parameter...
4
2543
by: jason | last post by:
my w3wp.exe process has recently gotten an ever-expanding memory footprint. the two most likely causes are either a memory leak in the object library it uses, or session variables not getting...
5
6468
by: Michael Primeaux | last post by:
I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature: void HelloWorld(Guid parameter1); When calling this method I receive the...
8
2894
by: Arjan | last post by:
Hello, I have been looking for a couple of days now, but I can't find anything about how to deal with StringBuilder and releasing the memory used by it. When I use stringbuilder, the memory...
4
5499
by: Marc | last post by:
Hi, I don't get it I cannot get this to work, can somebody give me a hint Table1 contains a field Id which is a GUID as primary key and DATA a string, I want to insert a new row but it does not...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.