You could say
RssFeedReader rss;
rss = this.ParentToolPane.SelectedWebPart as RssFeedReader;
if(rss != null) {
// an RssFeedReader
}
RssCountry rc;
rc = this.ParentToolPane.SelectedWebPart as RssCountry;
if(rc != null) {
// an RssCountry
}
or
if(this.ParentToolPane.SelectedWebPart is RssFeedReader) {
// an RssFeedReader
RssFeedReader rss = (RssFeedReader)this.ParentToolPane.SelectedWebPart;
}
if(this.ParentToolPane.SelectedWebPart is RssCountry) {
// an RssCountry
RssCountry rc = (RssCountry)this.ParentToolPane.SelectedWebPart;
}
But, be warned. Almost any time that you are basing your logic on the type is a bad design smell!