<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Tech Off - Hiding Interface Members</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Tech Off - Hiding Interface Members</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Thu, 23 May 2013 21:00:03 GMT</pubDate>
	<lastBuildDate>Thu, 23 May 2013 21:00:03 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>7</c9:totalResults>
	<c9:pageCount>-7</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Tech Off - Hiding Interface Members</title>
		<description><![CDATA[<p>I have been trying to get more experience with writing libraries.. and I have a question about how interface members can be hidden.<br /><br />I am trying to create a strongly typed collection, just like the TreeNodeCollection class. TreeNodeCollection implement IList, but it does not contain a visible definition of &quot;public int Add(object value)&quot; which is required for that interface. Instead it contains
 &quot;public virtual new System.Int32 Add ( System.Windows.Forms.TreeNode node )&quot; and an overloaded method &quot;public virtual new System.Windows.Forms.TreeNode Add ( System.String text )&quot;<br /><br />How is it that this class doesn't show a visible method for the IList version of Add? If I change the signature in my class to the object type I want to use as opposed to plain old &quot;object&quot; I get an error saying that my class has not implement the required
 IList Add method. Thanks for any info.<br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/5558#5558</link>
		<pubDate>Tue, 04 May 2004 04:22:51 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/5558#5558</guid>
		<dc:creator>JParrish</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/JParrish/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Hiding Interface Members</title>
		<description><![CDATA[<p>You can implement interface methods using the following C# syntax:<br /><br />public class Foo : IList<br />{<br />&nbsp;&nbsp;&nbsp; public int IList.Add(object value)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // your IList Add impl<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />Doing so is called implementing the interface explicitly and by doing this, the methods will be available only on the interface.<br /><br />This means that in order to call Add(object) on class Foo, you'd first need to cast it to an IList.<br /><br />HTH...</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/a5432531500b4b0db0d89dea010fbd50#a5432531500b4b0db0d89dea010fbd50</link>
		<pubDate>Tue, 04 May 2004 06:35:50 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/a5432531500b4b0db0d89dea010fbd50#a5432531500b4b0db0d89dea010fbd50</guid>
		<dc:creator>Matt.Berther</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Matt.Berther/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Hiding Interface Members</title>
		<description><![CDATA[<p>Thanks for reply.. I looked at explicit interface implementation as one possibility but&nbsp; there is still a problem with this because I want my collection to enforce an expected object type when I call Add.. for example.. in my case I have an &quot;SRSItemCollection&quot;
 class that would have an &quot;Add(SRSItem)&quot; method signature. because this implementation doesn't have &quot;object&quot; as the parameter type, I still get an error stating that the interface method has not been implemented. That makes sense to me as far as interfaces
 are concerned, but why does the TreeNodeCollection class get away with it?<br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/10c2731ada474541be189dea010fbd7a#10c2731ada474541be189dea010fbd7a</link>
		<pubDate>Tue, 04 May 2004 06:43:56 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/10c2731ada474541be189dea010fbd7a#10c2731ada474541be189dea010fbd7a</guid>
		<dc:creator>JParrish</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/JParrish/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Hiding Interface Members</title>
		<description><![CDATA[<p>Try something like this:<br /><br />public class SRSItemCollection : IList<br />{<br />&nbsp;&nbsp;&nbsp; public void Add(SRSItem value)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp; void IList.Add(object value)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; }<br />}<br /><br />In this case, the public interface to SRSItemCollection will expose Add(SRSItem), however the IList.Add will have an explicit implementation (which the Add(SRSItem) would defer to).<br /><br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/ec880bb0c9954e8880c39dea010fbda5#ec880bb0c9954e8880c39dea010fbda5</link>
		<pubDate>Tue, 04 May 2004 06:56:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/ec880bb0c9954e8880c39dea010fbda5#ec880bb0c9954e8880c39dea010fbda5</guid>
		<dc:creator>Matt.Berther</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Matt.Berther/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Hiding Interface Members</title>
		<description><![CDATA[<p>Thanks very much! That did the trick. I didn't pick up on declaring a public&nbsp;method over top of the explicit interface method when I read about explicit interface methods.&nbsp;Thanks again =)&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/ed0a6d9b735d4b38bc299dea010fbdcf#ed0a6d9b735d4b38bc299dea010fbdcf</link>
		<pubDate>Tue, 04 May 2004 07:10:54 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/ed0a6d9b735d4b38bc299dea010fbdcf#ed0a6d9b735d4b38bc299dea010fbdcf</guid>
		<dc:creator>JParrish</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/JParrish/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Hiding Interface Members</title>
		<description><![CDATA[<p>Try inheriting from System.Collections.CollectionBase. It not only provides a lot of the collection methods but it the internal data structures as well.<br /><br />A lot less work than implementing IList manually.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/9343f06bcd374a358d609dea010fbdf8#9343f06bcd374a358d609dea010fbdf8</link>
		<pubDate>Tue, 04 May 2004 17:56:01 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/9343f06bcd374a358d609dea010fbdf8#9343f06bcd374a358d609dea010fbdf8</guid>
		<dc:creator>Mike Sampson</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sampy/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Hiding Interface Members</title>
		<description><![CDATA[<p>Thanks.. its funny I was talking with a co-worker about that about 10 minutes ago. I didn't realize last night that CollectionBase implemented IList, because it did not have an Add(*) at all. I looked into it more now, and I see that within the implementation
 class for CollectionBase you can reference &quot;List&quot; which provides an ability to call Add(object value). That will save me from keeping a private ArrayList.. and accessors.. thanks for the suggestion =)<br /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/397791cf66a74c8d9ba59dea010fbe22#397791cf66a74c8d9ba59dea010fbe22</link>
		<pubDate>Tue, 04 May 2004 18:21:24 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/5558-Hiding-Interface-Members/397791cf66a74c8d9ba59dea010fbe22#397791cf66a74c8d9ba59dea010fbe22</guid>
		<dc:creator>JParrish</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/JParrish/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>