<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Some basic (but effective) .NET interview questions</title>
	<atom:link href="http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html</link>
	<description>Thoughts on software development and project management</description>
	<pubDate>Sat, 06 Sep 2008 18:48:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Paul Hyman</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-41544</link>
		<dc:creator>Paul Hyman</dc:creator>
		<pubDate>Thu, 14 Aug 2008 02:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-41544</guid>
		<description>Here's an interview technique no one that I know of has ever tried, but which I think would be very good at determining how much an asp.net developer knows.  Simply give the person a listing of an .aspx file from a web site and ask him or her to go line by line and explain everything they can.  They don't have to figure out what it's doing, just show that they're familiar with the various server controls, html statements, etc.   If you wanted to test someone's C# knowledge, hand them some code and ask them to tell you whatever they can.  Again, they don't need to figure out what it's doing - the idea is by them describing whatever they can about the code, you get a good idea of what they know.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s an interview technique no one that I know of has ever tried, but which I think would be very good at determining how much an asp.net developer knows.  Simply give the person a listing of an .aspx file from a web site and ask him or her to go line by line and explain everything they can.  They don&#8217;t have to figure out what it&#8217;s doing, just show that they&#8217;re familiar with the various server controls, html statements, etc.   If you wanted to test someone&#8217;s C# knowledge, hand them some code and ask them to tell you whatever they can.  Again, they don&#8217;t need to figure out what it&#8217;s doing - the idea is by them describing whatever they can about the code, you get a good idea of what they know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-39970</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Sat, 26 Jul 2008 16:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-39970</guid>
		<description>Here is a good collection of .Net 3.0 Interview Questions and Answers

http://www.oopsconcepts.com/Net+3+Interview+Questions+and+Answers</description>
		<content:encoded><![CDATA[<p>Here is a good collection of .Net 3.0 Interview Questions and Answers</p>
<p><a href="http://www.oopsconcepts.com/Net+3+Interview+Questions+and+Answers" rel="nofollow">http://www.oopsconcepts.com/Net+3+Interview+Questions+and+Answers</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-39969</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Sat, 26 Jul 2008 16:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-39969</guid>
		<description>Here is a good collection of .Net 3.0 Interview Questions

http://www.oopsconcepts.com/Net+3+Interview+Questions+and+Answers</description>
		<content:encoded><![CDATA[<p>Here is a good collection of .Net 3.0 Interview Questions</p>
<p><a href="http://www.oopsconcepts.com/Net+3+Interview+Questions+and+Answers" rel="nofollow">http://www.oopsconcepts.com/Net+3+Interview+Questions+and+Answers</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-36273</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sat, 21 Jun 2008 08:17:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-36273</guid>
		<description>great site with good info</description>
		<content:encoded><![CDATA[<p>great site with good info</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buu Nguyen</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28637</link>
		<dc:creator>Buu Nguyen</dc:creator>
		<pubDate>Mon, 11 Feb 2008 15:11:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28637</guid>
		<description>@Wink Jr.:
&lt;blockquote&gt;all access limited to solution includes “types or subclasses derived from the containing class”.&lt;/blockquote&gt;
Well, I'm afraid your MS friend is not correct about this.  It's not VS.NET *solution* that the language specification refers to by the term "program", it's the *assembly* (thus expose behavior of &lt;code&gt;internal&lt;/code&gt; keyword).  Note that a VS.NET solution may or may not map to one assembly.  (I'd typically prefer to avoid VS.NET concepts when discussing CLR stuffs to avoid confusion since the CLR can live well without VS.NET.)  On the other hand, please also note that types or subclasses derived from the containing class can come from other assemblies (thus expose behavior of &lt;code&gt;protected&lt;/code&gt; keyword).  

In short, as mentioned in the earlier response: &lt;strong&gt;members declared as protected internal is accessible by any type in the defining assembly OR any derived type regardless of assembly.&lt;/strong&gt;  

The easiest way to verify it: 
- Create a VS.NET solution.
- Create 2 projects (by default, VS.NET will build each project to a separate assembly).
- Create a type called &lt;code&gt;Base &lt;/code&gt;in Project 1 with a &lt;code&gt;protected internal &lt;/code&gt;field called &lt;code&gt;name&lt;/code&gt; (of any type).
- Create a type &lt;code&gt;Other &lt;/code&gt;in Project 1.  Inside a method of &lt;code&gt;Other&lt;/code&gt;, instantiate a &lt;code&gt;Base &lt;/code&gt;and you will see &lt;code&gt;Other &lt;/code&gt;can access to the &lt;code&gt;name &lt;/code&gt;field of the &lt;code&gt;Base&lt;/code&gt;' instance.
- Create a type &lt;code&gt;Sub &lt;/code&gt;in Project 2 and inherit &lt;code&gt;Base&lt;/code&gt;.  You will see &lt;code&gt;Sub &lt;/code&gt;can access to the &lt;code&gt;name &lt;/code&gt;field of &lt;code&gt;Base&lt;/code&gt;, even though &lt;code&gt;Sub &lt;/code&gt;is in a different assembly.
- Now, if you remove the modifier &lt;code&gt;protected &lt;/code&gt;from &lt;code&gt;name &lt;/code&gt;field of &lt;code&gt;Base&lt;/code&gt;.  The code of &lt;code&gt;Sub &lt;/code&gt;won't compile any longer because of visibility insufficiency.</description>
		<content:encoded><![CDATA[<p>@Wink Jr.:</p>
<blockquote><p>all access limited to solution includes “types or subclasses derived from the containing class”.</p></blockquote>
<p>Well, I&#8217;m afraid your MS friend is not correct about this.  It&#8217;s not VS.NET *solution* that the language specification refers to by the term &#8220;program&#8221;, it&#8217;s the *assembly* (thus expose behavior of <code>internal</code> keyword).  Note that a VS.NET solution may or may not map to one assembly.  (I&#8217;d typically prefer to avoid VS.NET concepts when discussing CLR stuffs to avoid confusion since the CLR can live well without VS.NET.)  On the other hand, please also note that types or subclasses derived from the containing class can come from other assemblies (thus expose behavior of <code>protected</code> keyword).  </p>
<p>In short, as mentioned in the earlier response: <strong>members declared as protected internal is accessible by any type in the defining assembly OR any derived type regardless of assembly.</strong>  </p>
<p>The easiest way to verify it:<br />
- Create a VS.NET solution.<br />
- Create 2 projects (by default, VS.NET will build each project to a separate assembly).<br />
- Create a type called <code>Base </code>in Project 1 with a <code>protected internal </code>field called <code>name</code> (of any type).<br />
- Create a type <code>Other </code>in Project 1.  Inside a method of <code>Other</code>, instantiate a <code>Base </code>and you will see <code>Other </code>can access to the <code>name </code>field of the <code>Base</code>&#8216; instance.<br />
- Create a type <code>Sub </code>in Project 2 and inherit <code>Base</code>.  You will see <code>Sub </code>can access to the <code>name </code>field of <code>Base</code>, even though <code>Sub </code>is in a different assembly.<br />
- Now, if you remove the modifier <code>protected </code>from <code>name </code>field of <code>Base</code>.  The code of <code>Sub </code>won&#8217;t compile any longer because of visibility insufficiency.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wink Jr.</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28601</link>
		<dc:creator>Wink Jr.</dc:creator>
		<pubDate>Mon, 11 Feb 2008 07:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28601</guid>
		<description>Well, I called a pal at Microsoft and ran your concepts of "internal", "protected" and "internal protected" by him - yes, like me, he's up at 11PM on a Sunday normally. :)

You wrote about the latter: &lt;strong&gt;Protected internal&lt;/strong&gt;, which is selected by including both a protected and an internal modifier in the member declaration. The intuitive meaning of protected internal is “access limited to this program or types derived from the containing class”.

His take was this: &lt;b&gt;exactly&lt;/b&gt;.  Access is limit to this "Solution" (he said "program was not the correct term") - "or" - he said "should be and, really" the types derived - but again, what he said agreed with my answer - &lt;b&gt;all access limited to solution&lt;/b&gt; includes "types or subclasses derived from the containing class”.  So the "internal" is a superset of "protected" and in VS 2008 supercedes "protected" - so it's moot.  Or as he put it, "a ***ing waste of time."  I'll save you the rest of his ranting.  :)  I don't work at Microsoft because of that kind of culture.

I tried to debate him to get any subtle difference in "any way" but he said "if you declared 'internal', VS will ignore 'protected' so it's a waste of code. It's like a comment except it means nothing."

Still, the more I think about it, the more if falls into my idea of when I'd rather hear someone say "I don't know."  I stand firmly by my belief that out of all the people I've ever been involved in hiring, the ones that said "I don't know" at some point have turned out to be, without exception, excellent hires.

This has been an excellent discussion.  Thank you so very much!</description>
		<content:encoded><![CDATA[<p>Well, I called a pal at Microsoft and ran your concepts of &#8220;internal&#8221;, &#8220;protected&#8221; and &#8220;internal protected&#8221; by him - yes, like me, he&#8217;s up at 11PM on a Sunday normally. <img src='http://www.buunguyen.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You wrote about the latter: <strong>Protected internal</strong>, which is selected by including both a protected and an internal modifier in the member declaration. The intuitive meaning of protected internal is “access limited to this program or types derived from the containing class”.</p>
<p>His take was this: <b>exactly</b>.  Access is limit to this &#8220;Solution&#8221; (he said &#8220;program was not the correct term&#8221;) - &#8220;or&#8221; - he said &#8220;should be and, really&#8221; the types derived - but again, what he said agreed with my answer - <b>all access limited to solution</b> includes &#8220;types or subclasses derived from the containing class”.  So the &#8220;internal&#8221; is a superset of &#8220;protected&#8221; and in VS 2008 supercedes &#8220;protected&#8221; - so it&#8217;s moot.  Or as he put it, &#8220;a ***ing waste of time.&#8221;  I&#8217;ll save you the rest of his ranting.  <img src='http://www.buunguyen.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I don&#8217;t work at Microsoft because of that kind of culture.</p>
<p>I tried to debate him to get any subtle difference in &#8220;any way&#8221; but he said &#8220;if you declared &#8216;internal&#8217;, VS will ignore &#8216;protected&#8217; so it&#8217;s a waste of code. It&#8217;s like a comment except it means nothing.&#8221;</p>
<p>Still, the more I think about it, the more if falls into my idea of when I&#8217;d rather hear someone say &#8220;I don&#8217;t know.&#8221;  I stand firmly by my belief that out of all the people I&#8217;ve ever been involved in hiring, the ones that said &#8220;I don&#8217;t know&#8221; at some point have turned out to be, without exception, excellent hires.</p>
<p>This has been an excellent discussion.  Thank you so very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wink Jr.</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28599</link>
		<dc:creator>Wink Jr.</dc:creator>
		<pubDate>Mon, 11 Feb 2008 07:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28599</guid>
		<description>Thank you &lt;strong&gt;SO VERY MUCH&lt;/strong&gt; for not being offended by my questions!  You rock!  I've linked to this article on my blog twice but I think now I'll have to write an entire entry - I'm much like you, I love to hear different ideas and opinions.  You're a smart guy, but I'm not, and I'll be the first to admit I'm more often wrong than I am right.  Thanks for being so COOL.  :)

P.S. My last post got repeated twice, can you delete the second one?

P.P.S. Great answer!  With your permission (here or via email) I would like to throw it at some of the people at Microsoft on the Visual Studio team!

PPP.S. Again, thanks for not thinking I'm just being a jerk.  So many people on the Internet these days (I go back to USENET in 1984) assume everything is meant to be confrontational, and it's nice to meet a fellow spirit who understands the old Greek questions/answer/debate method of learning (I know there's a Greek &#38; English term for it, but it's almost midnight on Sunday and my brain - she be broke!)  Anyway, cheers for being chill!</description>
		<content:encoded><![CDATA[<p>Thank you <strong>SO VERY MUCH</strong> for not being offended by my questions!  You rock!  I&#8217;ve linked to this article on my blog twice but I think now I&#8217;ll have to write an entire entry - I&#8217;m much like you, I love to hear different ideas and opinions.  You&#8217;re a smart guy, but I&#8217;m not, and I&#8217;ll be the first to admit I&#8217;m more often wrong than I am right.  Thanks for being so COOL.  <img src='http://www.buunguyen.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S. My last post got repeated twice, can you delete the second one?</p>
<p>P.P.S. Great answer!  With your permission (here or via email) I would like to throw it at some of the people at Microsoft on the Visual Studio team!</p>
<p>PPP.S. Again, thanks for not thinking I&#8217;m just being a jerk.  So many people on the Internet these days (I go back to USENET in 1984) assume everything is meant to be confrontational, and it&#8217;s nice to meet a fellow spirit who understands the old Greek questions/answer/debate method of learning (I know there&#8217;s a Greek &amp; English term for it, but it&#8217;s almost midnight on Sunday and my brain - she be broke!)  Anyway, cheers for being chill!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wink Jr.</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28586</link>
		<dc:creator>Wink Jr.</dc:creator>
		<pubDate>Mon, 11 Feb 2008 05:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28586</guid>
		<description>Let me ask you .NET question.

You're programming in C# - 1.0, 2.0 or 3.0.  You could be running on .NET 1.0, 1.1, 2.0, 3.0, or 3.5 at least.  How does your application tell what version of .NET its running on, and how do you write code that will run on at least .NET 1.1, .NET 2.0, 3.0 and 3.4?

Clue: the answer would take you an hour to explain.  I'm looking forward to hearing your answer to my interview question as to why I would want to work for you / why you should keep your job, plus the answer to why you would &lt;strong&gt;ever&lt;/strong&gt; combine &lt;code&gt;internal&lt;/code&gt; and &lt;code&gt;protected&lt;/code&gt; when the former is a superset of the latter, which you deftly avoided answering in your reply.

That, or you can admit you don't know.  But I'm sure that would never happen.

And that's actually a point worth making about interviewing and finding good employees - I've hired maybe two dozen people in my career, and every one of them that  at some point was honest enough to say "I won't B.S. you - I don't know" - every one of them is someone I'm still in touch with and would work for, with, or hire again in a second.  Because "I don't know" is often the Right Answer.&#8482;  At least in the &lt;strong&gt;Real World&lt;/strong&gt;.  :) Cheers, Wink</description>
		<content:encoded><![CDATA[<p>Let me ask you .NET question.</p>
<p>You&#8217;re programming in C# - 1.0, 2.0 or 3.0.  You could be running on .NET 1.0, 1.1, 2.0, 3.0, or 3.5 at least.  How does your application tell what version of .NET its running on, and how do you write code that will run on at least .NET 1.1, .NET 2.0, 3.0 and 3.4?</p>
<p>Clue: the answer would take you an hour to explain.  I&#8217;m looking forward to hearing your answer to my interview question as to why I would want to work for you / why you should keep your job, plus the answer to why you would <strong>ever</strong> combine <code>internal</code> and <code>protected</code> when the former is a superset of the latter, which you deftly avoided answering in your reply.</p>
<p>That, or you can admit you don&#8217;t know.  But I&#8217;m sure that would never happen.</p>
<p>And that&#8217;s actually a point worth making about interviewing and finding good employees - I&#8217;ve hired maybe two dozen people in my career, and every one of them that  at some point was honest enough to say &#8220;I won&#8217;t B.S. you - I don&#8217;t know&#8221; - every one of them is someone I&#8217;m still in touch with and would work for, with, or hire again in a second.  Because &#8220;I don&#8217;t know&#8221; is often the Right Answer.&trade;  At least in the <strong>Real World</strong>.  <img src='http://www.buunguyen.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Cheers, Wink</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buu Nguyen</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28581</link>
		<dc:creator>Buu Nguyen</dc:creator>
		<pubDate>Mon, 11 Feb 2008 04:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28581</guid>
		<description>@Wink Jr: 
Again, thanks for your comment.  I like to receive different views and feedbacks and definitely don't find your opinion offensive at all.

Regarding the use of &lt;code&gt;protected internal&lt;/code&gt;, the only reason that I can *confirm" is because I have written such code and observed the behavior many times (instead of simply trusting some arbitrary articles or forum Q&#038;As).  In simple words, members declared as protected internal is accessible by any type in the defining assembly OR any derived type regardless of assembly.

And even if you don't want to type the code in and assert the behavior, a quick look at the language specification reveals the followings:

&lt;blockquote&gt;
&lt;em&gt;Source: C# language spec, 4th ed, June 2006, p90&lt;/em&gt;
&lt;strong&gt;Protected&lt;/strong&gt;, which is selected by including a protected modifier in the member declaration. The intuitive meaning of protected is “access limited to the containing class or types derived from the containing class”.

&lt;strong&gt;Internal&lt;/strong&gt;, which is selected by including an internal modifier in the member declaration. The intuitive meaning of internal is “access limited to this program”. 

&lt;strong&gt;Protected internal&lt;/strong&gt;, which is selected by including both a protected and an internal modifier in the member declaration. The intuitive meaning of protected internal is “access limited to this program or types derived from the containing class”.
&lt;/blockquote&gt;

I don't trust all Q&#038;As in the forum though, just because some "expert" says "You should not" does not mean you should not - who knows whether the folk really understands what s/he's talking about.  I'd prefer do my own homework (fire up VS.NET, type the code in, observe the behavior, ildasm it, or refer to the language spec or books by guys like Jeffery Richter) rather than simply listen to some arbitrary people in forums.  

Finally, I've just fired up my VS.NET &#038; ildasm to verify the claim you have for changes in .NET 3.5.  And I can confirm that there's no such change and the &lt;code&gt;protected internal&lt;/code&gt; members in C# 3.0 behave exactly as in C# 1.0/2.0.  (BTW, as the IL generated is the same in these versions of C#, this accessibility behavior in other CLR languages like VB.NET should also be the same.  But I have not written the code to check that myself, thus I will not confirm.)

Peace!</description>
		<content:encoded><![CDATA[<p>@Wink Jr:<br />
Again, thanks for your comment.  I like to receive different views and feedbacks and definitely don&#8217;t find your opinion offensive at all.</p>
<p>Regarding the use of <code>protected internal</code>, the only reason that I can *confirm&#8221; is because I have written such code and observed the behavior many times (instead of simply trusting some arbitrary articles or forum Q&#038;As).  In simple words, members declared as protected internal is accessible by any type in the defining assembly OR any derived type regardless of assembly.</p>
<p>And even if you don&#8217;t want to type the code in and assert the behavior, a quick look at the language specification reveals the followings:</p>
<blockquote><p>
<em>Source: C# language spec, 4th ed, June 2006, p90</em><br />
<strong>Protected</strong>, which is selected by including a protected modifier in the member declaration. The intuitive meaning of protected is “access limited to the containing class or types derived from the containing class”.</p>
<p><strong>Internal</strong>, which is selected by including an internal modifier in the member declaration. The intuitive meaning of internal is “access limited to this program”. </p>
<p><strong>Protected internal</strong>, which is selected by including both a protected and an internal modifier in the member declaration. The intuitive meaning of protected internal is “access limited to this program or types derived from the containing class”.
</p></blockquote>
<p>I don&#8217;t trust all Q&#038;As in the forum though, just because some &#8220;expert&#8221; says &#8220;You should not&#8221; does not mean you should not - who knows whether the folk really understands what s/he&#8217;s talking about.  I&#8217;d prefer do my own homework (fire up VS.NET, type the code in, observe the behavior, ildasm it, or refer to the language spec or books by guys like Jeffery Richter) rather than simply listen to some arbitrary people in forums.  </p>
<p>Finally, I&#8217;ve just fired up my VS.NET &#038; ildasm to verify the claim you have for changes in .NET 3.5.  And I can confirm that there&#8217;s no such change and the <code>protected internal</code> members in C# 3.0 behave exactly as in C# 1.0/2.0.  (BTW, as the IL generated is the same in these versions of C#, this accessibility behavior in other CLR languages like VB.NET should also be the same.  But I have not written the code to check that myself, thus I will not confirm.)</p>
<p>Peace!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wink Jr.</title>
		<link>http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28579</link>
		<dc:creator>Wink Jr.</dc:creator>
		<pubDate>Mon, 11 Feb 2008 03:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.buunguyen.net/blog/some-basic-but-effective-net-interview-questions.html#comment-28579</guid>
		<description>Thanks for your reply.  You say you can confirm there's a "perfect reason for the combination of the internal and and protected" keywords but then you don't, and after I read that question, all I found on the MSDN forums from Microsoft .NET experts is that you don't want to combine them.  So I'm really curious what this "perfect reason" is, when everything I've read is that you don't want to combine them, and indeed, the VS Studio IDE team is going to make this an error in a future release?

I still think it's an invalid statement that you would never want to use, and that if you read MSDN forums, the fact you can write such a statement is invalid and should throw up a warning, just like trying to declare a "private static const".  The "protected" keywork indicates one scope, the "internal" another, and the twain shalt never meet.

I guess the reason this raises my ire is that in the last 4-5 years of my career I've been bouncing between being very high level and hiring people to being a low-level "Code Jockey" being hired, and your question is similar to many I've run into in interviewing this past six months for a full-time job, having decided that freelancing will be the death of me.

That conclusion is that I get asked questions like the one you brought up that is not really a valid question other than "VS should complain about it but doesn't" - I've got 25+ years of experience in this field, and I'm tired of being interviewed by people who don't know what they're talking about but somehow have managed to squirrel their way into a very high-level position, when I'm a firm believer that a Team Lead or Manager should be able to, or at least have done, 80% of what the team he/she is hiring has and will.  But instead I've run into questions like yours that make me think "this person will be my manager, or my manager's manager, but will never understand what I'm doing."

Your question, I still insist, is invalid, and the answer is "Don't do that."  To try to declare the scope of a const or variable to be both only within that class and subclasses *and* also be available to any class in the C# project, which is what "internal" means, at least in .NET 3.5 - well, obvious "internal" covers what "protected" means and therefore makes it irrelevant.

It's like the VP of Eng at a company I'll name, since the employees and managers seemed like they all knew what they were doing despite this obviously clueless VP somehow getting a job there - at one point in the interview, he said they were switching their customer-facing Web pages from PHP to Java, so of course, I asked if my JSP experience would help with that.  And what I got was a look of confusion, and then I was asked "what JSP had to do with it?" and that they were going to generate Web pages "directly from Java."

The manager of that team of course rolled his eyes and said "Yeah, it means switching to JSP, he doesn't get it, but we'll get it done anyway."

The difference is that unlike that manager, I cannot stand to be in the same room with someone like that who's talking out their arse but making 2x my salary plus 10x stock options and who knows what kind of bonuses.

So, ultimately, I'm suggesting that instead of that question being a good one to ask, instead it shows what I believe is a lack of understanding on your own part of how .NET and C# works, and that it reveals yet another person who's been hired and/or promoted beyond their skill level (known as "The Peter Priniciple", a term coined in the 1960's.)

Give me one valid instance of when you would ever use "internal" and "protected" together and I'll happily retract all statements and change my mind.  Of course, you might want to try to convince the VS IDE Team at Microsoft too while you're at it.  But for now, methinks The Emperor Has No Clothes.

That said, I will say that at least half of your list are *excellent* questions.  It's just the ones that aren't that make me wonder if you really know enough about C# and .NET to be interviewing someone about it?

In conclusion, I just offer an opinion, mean no offense or insult, and Peace.  Cheers mate!  Wink</description>
		<content:encoded><![CDATA[<p>Thanks for your reply.  You say you can confirm there&#8217;s a &#8220;perfect reason for the combination of the internal and and protected&#8221; keywords but then you don&#8217;t, and after I read that question, all I found on the MSDN forums from Microsoft .NET experts is that you don&#8217;t want to combine them.  So I&#8217;m really curious what this &#8220;perfect reason&#8221; is, when everything I&#8217;ve read is that you don&#8217;t want to combine them, and indeed, the VS Studio IDE team is going to make this an error in a future release?</p>
<p>I still think it&#8217;s an invalid statement that you would never want to use, and that if you read MSDN forums, the fact you can write such a statement is invalid and should throw up a warning, just like trying to declare a &#8220;private static const&#8221;.  The &#8220;protected&#8221; keywork indicates one scope, the &#8220;internal&#8221; another, and the twain shalt never meet.</p>
<p>I guess the reason this raises my ire is that in the last 4-5 years of my career I&#8217;ve been bouncing between being very high level and hiring people to being a low-level &#8220;Code Jockey&#8221; being hired, and your question is similar to many I&#8217;ve run into in interviewing this past six months for a full-time job, having decided that freelancing will be the death of me.</p>
<p>That conclusion is that I get asked questions like the one you brought up that is not really a valid question other than &#8220;VS should complain about it but doesn&#8217;t&#8221; - I&#8217;ve got 25+ years of experience in this field, and I&#8217;m tired of being interviewed by people who don&#8217;t know what they&#8217;re talking about but somehow have managed to squirrel their way into a very high-level position, when I&#8217;m a firm believer that a Team Lead or Manager should be able to, or at least have done, 80% of what the team he/she is hiring has and will.  But instead I&#8217;ve run into questions like yours that make me think &#8220;this person will be my manager, or my manager&#8217;s manager, but will never understand what I&#8217;m doing.&#8221;</p>
<p>Your question, I still insist, is invalid, and the answer is &#8220;Don&#8217;t do that.&#8221;  To try to declare the scope of a const or variable to be both only within that class and subclasses *and* also be available to any class in the C# project, which is what &#8220;internal&#8221; means, at least in .NET 3.5 - well, obvious &#8220;internal&#8221; covers what &#8220;protected&#8221; means and therefore makes it irrelevant.</p>
<p>It&#8217;s like the VP of Eng at a company I&#8217;ll name, since the employees and managers seemed like they all knew what they were doing despite this obviously clueless VP somehow getting a job there - at one point in the interview, he said they were switching their customer-facing Web pages from PHP to Java, so of course, I asked if my JSP experience would help with that.  And what I got was a look of confusion, and then I was asked &#8220;what JSP had to do with it?&#8221; and that they were going to generate Web pages &#8220;directly from Java.&#8221;</p>
<p>The manager of that team of course rolled his eyes and said &#8220;Yeah, it means switching to JSP, he doesn&#8217;t get it, but we&#8217;ll get it done anyway.&#8221;</p>
<p>The difference is that unlike that manager, I cannot stand to be in the same room with someone like that who&#8217;s talking out their arse but making 2x my salary plus 10x stock options and who knows what kind of bonuses.</p>
<p>So, ultimately, I&#8217;m suggesting that instead of that question being a good one to ask, instead it shows what I believe is a lack of understanding on your own part of how .NET and C# works, and that it reveals yet another person who&#8217;s been hired and/or promoted beyond their skill level (known as &#8220;The Peter Priniciple&#8221;, a term coined in the 1960&#8217;s.)</p>
<p>Give me one valid instance of when you would ever use &#8220;internal&#8221; and &#8220;protected&#8221; together and I&#8217;ll happily retract all statements and change my mind.  Of course, you might want to try to convince the VS IDE Team at Microsoft too while you&#8217;re at it.  But for now, methinks The Emperor Has No Clothes.</p>
<p>That said, I will say that at least half of your list are *excellent* questions.  It&#8217;s just the ones that aren&#8217;t that make me wonder if you really know enough about C# and .NET to be interviewing someone about it?</p>
<p>In conclusion, I just offer an opinion, mean no offense or insult, and Peace.  Cheers mate!  Wink</p>
]]></content:encoded>
	</item>
</channel>
</rss>
