<?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 What is the best syntax here?? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46309#M1195</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my C# console application I tried using the below line of code to declare a IFeatureClassName object but Visual Studio 2010 says that FeatureClassNameClass() has No Constructors defined.&amp;nbsp; What??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassNameClass();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also If I changed my code to the below line of code Visual Studio will not show any errors on the syntax but when I start debugging my application and I reach this line, Visual Studio throws a crazy error stating something like "error on vshost32.. and just stops debugging&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassName();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any suggestions for me?&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Feb 2011 14:56:07 GMT</pubDate>
    <dc:creator>JoshV</dc:creator>
    <dc:date>2011-02-03T14:56:07Z</dc:date>
    <item>
      <title>What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46309#M1195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my C# console application I tried using the below line of code to declare a IFeatureClassName object but Visual Studio 2010 says that FeatureClassNameClass() has No Constructors defined.&amp;nbsp; What??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassNameClass();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also If I changed my code to the below line of code Visual Studio will not show any errors on the syntax but when I start debugging my application and I reach this line, Visual Studio throws a crazy error stating something like "error on vshost32.. and just stops debugging&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassName();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any suggestions for me?&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 14:56:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46309#M1195</guid>
      <dc:creator>JoshV</dc:creator>
      <dc:date>2011-02-03T14:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46310#M1196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The error means that the FeatureClassName class does not have a public constructor, meaning that you cannot create a new instance of the class.&amp;nbsp; You obtain a reference to this type of object from another class which is capable of accessing the private constructor and returning an instance of the class to you.&amp;nbsp; In your particular case, one way to get the reference you're looking for is through IDataset.FullName.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 19:49:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46310#M1196</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-02-03T19:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46311#M1197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In my C# console application I tried using the below line of code to declare a IFeatureClassName object but Visual Studio 2010 says that FeatureClassNameClass() has No Constructors defined.&amp;nbsp; What??&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassNameClass();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Also If I changed my code to the below line of code Visual Studio will not show any errors on the syntax but when I start debugging my application and I reach this line, Visual Studio throws a crazy error stating something like "error on vshost32.. and just stops debugging&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassName();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone have any suggestions for me?&amp;nbsp; Thanks&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Use something like below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IFeatureClassName pOutFeatClassName =&amp;nbsp; new FeatureClassNameClass();&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 10:55:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46311#M1197</guid>
      <dc:creator>Venkata_RaoTammineni</dc:creator>
      <dc:date>2011-02-04T10:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46312#M1198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Use something like below&lt;BR /&gt;&lt;BR /&gt;IFeatureClassName pOutFeatClassName =&amp;nbsp; new FeatureClassNameClass();&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried that and I get two errors.&amp;nbsp; FeatureClassNameClass has no constructors defined and Interop type FeatureClassNameClass cannot be embedded so use the applicable interface instead.&amp;nbsp; Neil's suggestion makes sense although I still don't understand why FeatureClassName has no constructors defined.&amp;nbsp; I'll try to see if I can use Dataset.FullName instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 12:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46312#M1198</guid>
      <dc:creator>JoshV</dc:creator>
      <dc:date>2011-02-07T12:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46313#M1199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The error means that the FeatureClassName class does not have a public constructor, meaning that you cannot create a new instance of the class.&amp;nbsp; You obtain a reference to this type of object from another class which is capable of accessing the private constructor and returning an instance of the class to you.&amp;nbsp; In your particular case, one way to get the reference you're looking for is through IDataset.FullName.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil do you know how I can fix this issue on the FeatureClassNameClass object without using IDataset.FullName?&amp;nbsp; I'm not sure what has caused this.&amp;nbsp; Could a custom class be created that could get this working on FeatureClassNameClass?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 12:53:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46313#M1199</guid>
      <dc:creator>JoshV</dc:creator>
      <dc:date>2011-02-07T12:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46314#M1200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;While there are classes in the ArcObjects model that you can't create yourself, it appears that the FeatureClassName class isn't one of them.&amp;nbsp; Your code should be fine.&amp;nbsp; Make sure you have all of the appropriate library references added to your project.&amp;nbsp; As far as I know, ESRI.ArcGIS.Geodatabase and ESRI.ArcGIS.System are required but there may be others (check the dev help).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 15:50:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46314#M1200</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-02-07T15:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46315#M1201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I've tried that and I get two errors.&amp;nbsp; FeatureClassNameClass has no constructors defined and Interop type FeatureClassNameClass cannot be embedded so use the applicable interface instead.&amp;nbsp; Neil's suggestion makes sense although I still don't understand why FeatureClassName has no constructors defined.&amp;nbsp; I'll try to see if I can use Dataset.FullName instead.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; IFeatureClass is an interface..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IFeatureClassName_Interface/0025000002s3000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IFeatureClassName_Interface/0025000002s3000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureClassName is coclass..its a creatable class..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/FeatureClassNameClass_Class/0025000000ms000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/FeatureClassNameClass_Class/0025000000ms000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureClass inFeatureClass = (IFeatureClass)lName.Open();&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureClassName inFeatureClassName = (IFeatureClassName)lName;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureClassName outFeatureClassName = new FeatureClassNameClass();&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDatasetName outDatasetName = (IDatasetName)outFeatureClassName;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDataset outWorkspaceDataset = (IDataset)outWorkspace;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IWorkspaceName outWorkspaceName =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IWorkspaceName)outWorkspaceDataset.FullName;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outDatasetName.WorkspaceName = outWorkspaceName;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 02:42:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46315#M1201</guid>
      <dc:creator>Venkata_RaoTammineni</dc:creator>
      <dc:date>2011-02-08T02:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best syntax here??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46316#M1202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had the same problem and I fixed it by changing the project "target framework" from 4.0 to 3.5 (in the application tab on the project properties). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Esri dose not support .Net framework 4.0 yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gur&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 11:50:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/what-is-the-best-syntax-here/m-p/46316#M1202</guid>
      <dc:creator>gurhanan</dc:creator>
      <dc:date>2011-11-21T11:50:39Z</dc:date>
    </item>
  </channel>
</rss>

