<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx</link><description>Continuing on the weekly series , today we posted the session on Member Types. Thanks for watching the last week’s session on naming conventions and coming that chat… If you missed it there will be a chat transcript posted soon. A couple of notes on this</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#368279</link><pubDate>Mon, 07 Feb 2005 08:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368279</guid><dc:creator>raul igrisan</dc:creator><description>Brad,&lt;br&gt;the synchronization in the singleton example you have linked to for slide 30 seems broken to me. each lazy initialization will wait on a different mutex.&lt;br&gt;&lt;br&gt;thanks,&lt;br&gt;raul</description></item><item><title>re: Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#368402</link><pubDate>Mon, 07 Feb 2005 14:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368402</guid><dc:creator>Brad Abrams[MSFT]</dc:creator><description>Here is the example that Rual is referring to (I believe)&lt;br&gt;public sealed class DBNull {&lt;br&gt;   private DBNull() {}&lt;br&gt;   public static readonly DBNull Value = new DBNull();&lt;br&gt;   // instance Methods...&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;The way this works is that the first time the DBNull class is accessed, the JIT runs the type constructor for DBNull which allocates the instance of DBNull… Each time after that the cached DBNull is returned.  Notice that JIT is responsible for ensuring that only one thread causes the DBNull’s type constructor to be run.  &lt;br&gt;&lt;br&gt;Does that help?&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#368421</link><pubDate>Mon, 07 Feb 2005 14:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:368421</guid><dc:creator>raul igrisan</dc:creator><description>nope. the one I'm refferin is the the Gang of 4 's singleton &lt;a target="_new" href="http://www.dofactory.com/Patterns/PatternSingleton.aspx"&gt;http://www.dofactory.com/Patterns/PatternSingleton.aspx&lt;/a&gt; &lt;br&gt;&lt;br&gt;&amp;lt;quote&amp;gt;&lt;br&gt;  // Methods&lt;br&gt;  public static LoadBalancer GetLoadBalancer()&lt;br&gt;  {&lt;br&gt;    // Support multithreaded applications through&lt;br&gt;    // &amp;quot;Double checked locking&amp;quot; pattern which avoids&lt;br&gt;    // locking every time the method is invoked&lt;br&gt;    if( balancer == null )&lt;br&gt;    {&lt;br&gt;      // Only one thread can obtain a mutex&lt;br&gt;      Mutex mutex = new Mutex();&lt;br&gt;      mutex.WaitOne();&lt;br&gt;&lt;br&gt;      if( balancer == null )&lt;br&gt;        balancer = new LoadBalancer();&lt;br&gt;&lt;br&gt;      mutex.Close();&lt;br&gt;    }&lt;br&gt;    return balancer;&lt;br&gt;  }&lt;br&gt;&amp;lt;/quote&amp;gt;&lt;br&gt;&lt;br&gt;The last example you have given, the DBNull seems perfectly fine to me (thow the initialisation is not so lazy :)</description></item><item><title>Brad Abrams on Class Members (Summary)</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#369211</link><pubDate>Tue, 08 Feb 2005 21:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369211</guid><dc:creator>John Wood's Blog</dc:creator><description>Brad Abrams on Class Members (Summary)</description></item><item><title>Designing Great Frameworks - Member Type Coding Conventions: Properties Methods Events Constructors Indexers</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#369552</link><pubDate>Wed, 09 Feb 2005 04:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369552</guid><dc:creator>David Hayden - Sarasota Web Design Development - F</dc:creator><description /></item><item><title>The Designing .NET Class Libraries: Member Types chat is today! (Wednesday, February 09, 2005 at 1:00 p.m. Pacific Time)</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#369954</link><pubDate>Wed, 09 Feb 2005 22:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:369954</guid><dc:creator>frankred's WebLog</dc:creator><description /></item><item><title>re: Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#370300</link><pubDate>Thu, 10 Feb 2005 06:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:370300</guid><dc:creator>Vince Blasberg</dc:creator><description>Great information.  One more better would be a WMA version for the commute.  It's also not easy enough to find this information.</description></item><item><title>re: Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#370358</link><pubDate>Thu, 10 Feb 2005 09:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:370358</guid><dc:creator>Neil Cowburn</dc:creator><description>One request I have it is that these sessions are made as a downloadable package containing the ppt, wmv &amp;amp; transcript. That would be *invaluable*&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#370415</link><pubDate>Thu, 10 Feb 2005 13:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:370415</guid><dc:creator>Brad Abrams[MSFT]</dc:creator><description>Thanks for the feedback Vince, Neil... I am working with the MSDN guys to see what I can do.</description></item><item><title>Video - Where did it go?</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#371261</link><pubDate>Fri, 11 Feb 2005 19:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:371261</guid><dc:creator>Chad Yost</dc:creator><description>Anyone know why the video is no longer showing up.  I still hear it, but, since the redid the site on MSDN, there is no video. I like watching who is talking.</description></item><item><title>Designing great frameworks training: Designing Inherence hierarchies</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#372466</link><pubDate>Mon, 14 Feb 2005 22:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372466</guid><dc:creator>Brad Abrams </dc:creator><description /></item><item><title>re: Designing great frameworks training: Member Types</title><link>http://blogs.msdn.com/brada/archive/2005/02/05/367783.aspx#382360</link><pubDate>Tue, 01 Mar 2005 14:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:382360</guid><dc:creator>RGab</dc:creator><description>Hey Brad,&lt;br&gt;&lt;br&gt;awesome training series, was fun listening you spreading knowledge :)&lt;br&gt;&lt;br&gt;You are recommending using 'static readonly' fields instead of constants and only use constants when we are 101% sure that the literal won't change.&lt;br&gt;&lt;br&gt;When using 'static readonly' though, FxCop recommends:&lt;br&gt;&lt;br&gt;    Resolution   : &amp;quot;Field 'foo' is declared as 'static readonly' &lt;br&gt;                   but is initialized with a constant value '-1'. Mark &lt;br&gt;                   this field as 'const' instead.&amp;quot;&lt;br&gt;&lt;br&gt;Maybe it would be cool if FxCop pointed out the caveats of using const (compiler inlining the literal, versioning problems).&lt;br&gt;&lt;br&gt;RGab</description></item></channel></rss>