<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Comment Feed for !sizeof (TechOff on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/forums/techoff/258159-sizeof/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for !sizeof (TechOff on Channel 9)</title><link>http://channel9.msdn.com/forums/TechOff/258159-sizeof/</link></image><description>!sizeof</description><link>http://channel9.msdn.com/forums/TechOff/258159-sizeof/</link><language>en-us</language><pubDate>Thu, 11 Oct 2007 14:54:58 GMT</pubDate><lastBuildDate>Thu, 11 Oct 2007 14:54:58 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3243.35083, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: !sizeof</title><description>&lt;blockquote&gt;
				&lt;div&gt;thumbtacks2 wrote:&lt;/div&gt;
				&lt;div&gt;﻿In C#, it's my understanding that variables are created as objects. &lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;That depends. Primitive types are primitive and have a fixed size - ints are 32bit, longs are 64bit and so forth.&amp;nbsp; Here's a &lt;a href="http://msdn2.microsoft.com/en-us/library/ms228360(vs.80).aspx"&gt;reference&lt;/a&gt; of the C# primitive types and their sizes.&lt;br /&gt;&lt;br /&gt;It might also be a good idea to read up on boxing and unboxing to understand the meaning of an integer being both a primitive value type and also being an object inheriting from System.Object. Here's the &lt;a href="http://msdn2.microsoft.com/en-us/library/yz2be5wk(VS.80).aspx"&gt;MSDN lowdown&lt;/a&gt;. In a nutshell, an int will be a stack-allocated value as long as you treat it as such. Once you decide to treat it as an object (casting, polymorphism and the like) it will automatically be wrapped in a heap-allocated object.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/258159-sizeof/?CommentID=357987</link><pubDate>Thu, 11 Oct 2007 14:54:58 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/258159-sizeof/?CommentID=357987</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/357987/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	thumbtacks2 wrote:
				﻿In C#, it's my understanding that variables are created as objects. 
		
		
		That depends. Primitive types are primitive and have a fixed size - ints are 32bit, longs are 64bit and so forth.&amp;nbsp; Here's a reference of the C# primitive types and their sizes.It might also&amp;#8230;</evnet:previewtext><dc:creator>Yggdrasil</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/357987/Trackback.aspx</trackback:ping></item><item><title>Re: !sizeof</title><description>Getting the runtime size of a Managed object depends on a lot of factors, but there are some classes in System.Interop, primarily for marshalling between Managed and Non-Managed code. Generally speaking, you'll never need to touch it.&lt;br /&gt;&lt;br /&gt;What do you need the size of an object for? With the exception of structs like (U)Int* everything is on the heap and stored as references. So just multiply the class's fieldcount by the size of IntPtr... pointless (and totally inaccurate) measurement IMO.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/258159-sizeof/?CommentID=357802</link><pubDate>Wed, 10 Oct 2007 19:27:15 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/258159-sizeof/?CommentID=357802</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/357802/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Getting the runtime size of a Managed object depends on a lot of factors, but there are some classes in System.Interop, primarily for marshalling between Managed and Non-Managed code. Generally speaking, you'll never need to touch it.What do you need the size of an object for? With the exception of&amp;#8230;</evnet:previewtext><dc:creator>W3bbo</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/357802/Trackback.aspx</trackback:ping></item></channel></rss>