<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: from vb to c# not working</title><link>https://www.infopathdev.com:443/forums/thread/52092.aspx</link><pubDate>Tue, 23 Feb 2010 20:06:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52092</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52092.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52092</wfw:commentRss><description>&lt;p&gt;thanks!&amp;nbsp; i figured it had to be something simple.&amp;nbsp; i got it to work on another form and i&amp;#39;ll pass it to our guy to implement it.&lt;/p&gt;</description></item><item><title>Re: from vb to c# not working</title><link>https://www.infopathdev.com:443/forums/thread/52046.aspx</link><pubDate>Tue, 23 Feb 2010 04:42:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52046</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52046.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52046</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;In C#, indexers are accessed with square brackets, not parentheses:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;font size="2"&gt;DataSources&lt;span style="font-size:125%;"&gt;&lt;b&gt;[&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2" color="#a31515"&gt;&lt;font size="2" color="#a31515"&gt;&amp;quot;external datasource name&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span style="font-size:125%;"&gt;&lt;b&gt;]&lt;/b&gt;&lt;/span&gt;.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font size="2" color="#a31515"&gt;&lt;font size="2" color="#a31515"&gt;&amp;quot;xpath to field in external datasource&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(Application.User.LoginName);&lt;/font&gt;&lt;/p&gt;</description></item><item><title>from vb to c# not working</title><link>https://www.infopathdev.com:443/forums/thread/52044.aspx</link><pubDate>Tue, 23 Feb 2010 04:37:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52044</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52044.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52044</wfw:commentRss><description>&lt;p&gt;using infopath 2007 &lt;/p&gt;
&lt;p&gt;&amp;nbsp;i have the following in vb and works fine:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;DataSources(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;external datasource name&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xpath to field in external datasource&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(Application.User.LoginName)&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;however when putting that in c# we get this error&lt;/p&gt;
&lt;p&gt;&amp;#39;Microsoft.Office.InfoPath.XmlFormHostItem.DataSources&amp;#39; is a &amp;#39;property&amp;#39; but is used like a &amp;#39;method&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;what should it be in c#?&amp;nbsp; i can&amp;#39;t figure that out and the converter i use says the c# is the same as vb&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item></channel></rss>