<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to cast a FeatureClass? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-cast-a-featureclass/m-p/267458#M6889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shuping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct in your findings. You cannot cast a FeatureClass to IPolyline because a feature class is a collection of polyline. As you discovered, you'd first need to get a feature (IFeature) from the polyline feature class and then you could cast its shape to IPolyline.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2015 22:53:34 GMT</pubDate>
    <dc:creator>FreddieGibson</dc:creator>
    <dc:date>2015-06-25T22:53:34Z</dc:date>
    <item>
      <title>How to cast a FeatureClass?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-cast-a-featureclass/m-p/267456#M6887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to cast a featureclass to IPolyline.&amp;nbsp; In this piece of code below&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;&lt;EM&gt;IFeatureClass fcR = gHelp.GetFeatureClass(pWS2, fNameR);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;&lt;EM&gt;ESRI.ArcGIS.Geometry.IPolyline refLine = fcR as ESRI.ArcGIS.Geometry.IPolyline;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;the &lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;&lt;EM&gt;IPolyline refLine &lt;/EM&gt;&lt;/SPAN&gt;is null.&amp;nbsp; What's wrong in this piece of code?&amp;nbsp; Thanks if you can help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 15:26:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-cast-a-featureclass/m-p/267456#M6887</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2014-12-02T15:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to cast a FeatureClass?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-cast-a-featureclass/m-p/267457#M6888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found my mistake in my post.&amp;nbsp; The correct way is to cast a line feature of a featureclass as an IPolyline:&amp;nbsp; &lt;/P&gt;&lt;P&gt;ESRI.ArcGIS.Geometry.IPolyline pLine = (ESRI.ArcGIS.Geometry.IPolyline)feature.ShapeCopy; &lt;/P&gt;&lt;P&gt;Thanks for your review.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2014 12:26:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-cast-a-featureclass/m-p/267457#M6888</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2014-12-03T12:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to cast a FeatureClass?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-cast-a-featureclass/m-p/267458#M6889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shuping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct in your findings. You cannot cast a FeatureClass to IPolyline because a feature class is a collection of polyline. As you discovered, you'd first need to get a feature (IFeature) from the polyline feature class and then you could cast its shape to IPolyline.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 22:53:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-cast-a-featureclass/m-p/267458#M6889</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-06-25T22:53:34Z</dc:date>
    </item>
  </channel>
</rss>

