<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kevin.Gao.Blog() &#187; C# &amp; Java conversion</title>
	<atom:link href="http://www.kevingao.net/category/csharp-java-conversion/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kevingao.net</link>
	<description>SourceSafe, Source Control, Software Development</description>
	<lastBuildDate>Tue, 27 Jul 2010 12:26:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Get involved</title>
		<link>http://www.kevingao.net/csharp-java-conversion/get-involved.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/get-involved.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 07:38:55 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=689</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!
CSharpJavaMerger Framework is free and open source. It is developed by Dynamsoft. CSharpJavaMerger Framework isn&#8217;t perfect yet. Developers who are interested at the software are most welcome to get involved in the following ways:

Edit web pages
The ones [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p>CSharpJavaMerger Framework is free and open source. It is developed by Dynamsoft. CSharpJavaMerger Framework isn&#8217;t perfect yet. Developers who are interested at the software are most welcome to get involved in the following ways:</p>
<ul>
<li><strong>Edit web pages</strong><br />
The ones register will be granted with commit right to the wiki-type articles. To join KevinGao.net, you can register an account here:<br />
<a href="http://www.kevingao.net/wp-login">http://www.kevingao.net/wp-login</a></p>
<p>	After registering, you will receive an email including the password for your account. You can then log in KevinGao.net and make changes to the article.</p>
<p>
	You can find the wiki-type articles in <strong>Recent contributions to Wiki</strong> section at the bottom of Dashboard page.<br />
　</li>
<li><strong>Write Code</strong><br />
If you wish to contribute source code of CSharpJavaMerfer via SCM Anywhere Hosted, please contact Kevin Gao at <a href="mailto:kgao@dynamsoft.com">kgao@dynamsoft.com</a> with notice of your intension. He will give you an account of SCM Anywhere Hosted with change/commit right.<br />
　</li>
<li><strong>Submit feature requests or bug reports</strong><br />
If you have any feature requests or find any bugs, you can submit or update tickets in the Issue Tracking Explorer of SC M Anywhere Hosted:<br />
<a href="http://www.scmsoftwareconfigurationmanagement.com/help/SCM%20Hosted/Issue-Tracking/Issue.htm">http://www.scmsoftwareconfigurationmanagement.com/help/SCM%20Hosted/Issue-Tracking/Issue.htm</a></li>
</ul>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/license.html">License</a><br />
Next article &gt;&gt;&gt;&gt;:<br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/get-involved.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>License</title>
		<link>http://www.kevingao.net/csharp-java-conversion/license.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/license.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 07:29:05 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=687</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!
CSharpJavaMerger is distributed under General Public License (GPL).
 
Links:
Previous article &#62;&#62;&#62;&#62;: How to write Java code?
Next article &#62;&#62;&#62;&#62;: Get involved
WCF &#38; Java Interop series home page: CSharpJavaMerger Framework
]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p>CSharpJavaMerger is distributed under General Public License (GPL).</p>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-write-java-code.html">How to write Java code?</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Get involved</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/license.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to write Java code?</title>
		<link>http://www.kevingao.net/csharp-java-conversion/how-to-write-java-code.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/how-to-write-java-code.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 07:26:29 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=684</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!

Use &#8220;class&#8221; instead of &#8220;interface&#8221; in enumerations and add &#8220;public final static&#8221; keywords before enumerations.For example:

public class EnumEOL
{
  public final static int enumEOLNative = 0;
  public final static int enumEOLWindowsCRLF = 1;
  public final static int enumEOLUnixCR = 2;
  public final [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<ul>
<li>Use &#8220;class&#8221; instead of &#8220;interface&#8221; in enumerations and add &#8220;public final static&#8221; keywords before enumerations.For example:<br />
<code><br />
public class EnumEOL<br />
{<br />
  public final static int enumEOLNative = 0;<br />
  public final static int enumEOLWindowsCRLF = 1;<br />
  public final static int enumEOLUnixCR = 2;<br />
  public final static int enumEOLMacLF = 3;<br />
}</code></li>
<li>Don&#8217;t use &#8220;e.printStackTrace&#8221; in try… catch and System.out.println(e.getStackTrace(…)) in classes.</li>
<li>Don&#8217;t use annotations like @Override, @suppresswarning.</li>
<li>Use &#8220;CompareTo&#8221; and &#8220;CompareToIgnoreCace&#8221; to compare strings. Don&#8217;t use &#8220;equels ()&#8221; or &#8220;==&#8221;.</li>
<li>Replace all &#8220;String&#8221; with &#8220;CString&#8221;, which is a class defined in the CSharpJavaMerger Framework, except for the following two places:
<ul>
<li>Don&#8217;t change the &#8220;String&#8221; in &#8220;String Object&#8221;.</li>
<li>Don&#8217;t change the &#8220;String&#8221; in string constant. For example, public final static String VSSVER= &#8220;vssver.scc&#8221;</li>
</ul>
<p>Two things to notice:</p>
<ul>
<li>Use &#8220;string == null&#8221; instead of &#8220;CSting == null || CString.getValue() == null&#8221;.</li>
<li>The logic of Substring (int, int) is changed. The meaning of the 1st parameter is the same in C# and Java, while the 2nd one not. The 2nd parameter is the subscript of the substring in Java, and it means the length of the substring in C#. The substring of &#8220;CString&#8221; here is same with substring in C#.</li>
</ul>
</li>
<li>Use Debug.Assert (b) instead of assert (b). Debug is a class defined in CSharpJavaMerger Framework.</li>
<li>Omit &#8220;public&#8221; keyword in the member functions in interfaces.</li>
<li>Make sure the subclasses&#8217; functions, including returned value, function names, parameter list, are different from that of the superclass prototype, except implementation classes of Abstract and interface.</li>
<li>The name convention for variables of checkbox control variables: m_chk, for example, m_chkUseSSL.</li>
<li>Exception processing
<ul>
<li>Only catch the exceptions in java.lang.Exception, which is a base class of Java.<br />
After caching an exception, if any functions in java.lang.Exception need to be called, please add the objects in the constructor of CException, new an object of CException and call the according function of CException.For example:<br />
<code>try<br />
  {<br />
    //...<br />
  }<br />
  catch(Exception e1)<br />
  {<br />
    CException exp = new CException(e1);<br />
    CString str = exp.GetMessage()<br />
  }</code></li>
<li>Use e.GetMessage() instead of e.getLocaleMessage().</li>
</ul>
</li>
<li>File, I/O classes processing
<ul>
<li>Use CFile instead of File. CFile is a class in CSharpJava Framework. The class is used to judge file path, whether file exists or not, file&#8217;s properties, and whether files is deleted.</li>
<li>Use FileStream to read/write binary.</li>
<li>Use StreamWriter/StreamReader to read/write text.</li>
<li>Use CFileInputStream to read all files.</li>
<li>Use CFileOutputStream to write to all files.</li>
</ul>
</li>
<li>Use &#8220;DateTime&#8221; instead of &#8220;Calendar&#8221;. DateTime is a function in CSharepJavaMerger Framework.</li>
<li>Use Guid instead of UUID.</li>
<li>Omit Constructors called by Constructors. Replace &#8220;this ()&#8221; in Constructors with corresponding functions.</li>
<li>Add &#8220;break&#8221; before Default in switch case.</li>
<li>Use Boolean instead of Boolean. Boolean is a system class.</li>
<li>Replace Anonymous inner classes with inner or common classes.
<ul>
<li>Use List, Map etc instead of ArrayList, HashMap for statement. For example:<br />
Use: CList list = CList();<br />
Instead of ：ArrayList list = ArrayList()</li>
</ul>
</li>
<li>There may be some tricks when adding strings. For example:
<ul>
<li>CString str1 = new CString(&#8221;hello&#8221;);</li>
<li>CString str2 = new CString(&#8221;world&#8221; + str1);<br />
//This line can be compiled successfully.<br />
//However, what you want may be CString str2 = new CString(&#8221;World&#8221; + str1.getValue());</li>
</ul>
</li>
<li>Use CThread instead of Thread.</li>
<li>Use DESUtil instead of DES.</li>
<li>Capitalize the name of all packages.</li>
<li>Replace the function used for sorting &#8220;Collections.sort(listChangeSet,comparator);&#8221; with &#8220;list.Sort(Comparer comparer);&#8221;. Compare in a class in CSharepJavaMerger Framework.<br />
For example, use the following code:<br />
<code><br />
class SortListComparator extends Comparer&lt;Object&gt;<br />
{<br />
  public int Compare(Object obj1, Object obj2)<br />
  ...<br />
}</code><br />
Rather than:<br />
<code><br />
class SortListComparator implements Comparator&lt;Object&gt;<br />
{<br />
  public int compare(Object obj1, Object obj2)<br />
  ...<br />
}</code></li>
<li>Use CMap instead of Map. For example:<br />
Use:<br />
&#8220;CMap map = new CMap();&#8221;<br />
Instead of:<br />
&#8220;Map map = new HashMap();&#8221;</li>
<li>Don&#8217;t use Integer and Long system functions.</li>
<li>Change private inner constructors to be public.</li>
<li>If a member variable of a private inner class needs to be used by its external classes, please change the member variable to public.</li>
<li>If you want to convert between CString and Long, integer, please use Str.ToLong() instead of new Long(CString.GetValue).longValue().</li>
<li>Add [] before array definition like this:<br />
String [] var = null</li>
<li>Don&#8217;t use keywords as variables. For example,<br />
Do not use &#8220;out&#8221; which is in CFileStream out;.</li>
<li>Don&#8217;t get the string out of CString and then call the functions of String. For example:
<ul>
<li>Don&#8217;t use the following way: CString str; str.GetValue().compareTo</li>
<li>Other classes either. Don&#8217;t get the system classes and then call system functions.</li>
</ul>
</li>
<li>Don&#8217;t use the following functions:
<ul>
<li>Integer.intValue()</li>
<li>new Integer()</li>
<li>new Long</li>
<li>Long.longValue()</li>
</ul>
</li>
<li>If conditional expression (? : ) uses string, it&#8217;s not CString.</li>
</ul>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-write-csharp-code.html">How to write C# code?</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/license.html">License</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/how-to-write-java-code.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to write C# code?</title>
		<link>http://www.kevingao.net/csharp-java-conversion/how-to-write-csharp-code.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/how-to-write-csharp-code.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 06:52:46 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=679</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!

Use &#8220;base&#8221; instead of &#8220;super&#8221;.
Use &#8220;namespace&#8221; instead of &#8220;package&#8221;.
Use &#8220;using&#8221; instead of &#8220;import&#8221;. You can comment the import section and use the Resolve function of Visual Studio 2008 to add &#8220;using&#8221; automatically.
Omit &#8220;throw Exception&#8221; in the end [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<ul>
<li>Use &#8220;base&#8221; instead of &#8220;super&#8221;.</li>
<li>Use &#8220;namespace&#8221; instead of &#8220;package&#8221;.</li>
<li>Use &#8220;using&#8221; instead of &#8220;import&#8221;. You can comment the import section and use the Resolve function of Visual Studio 2008 to add &#8220;using&#8221; automatically.</li>
<li>Omit &#8220;throw Exception&#8221; in the end of the functions.</li>
<li>Using &#8220;delegate callback&#8221; when accessing UI resources through workers threads.Below is the example of closing dialog boxes in workers thread:
<ul>
<li>Java<br />
<code>public void closeDialog()<br />
{<br />
  m_isCanceled = false;<br />
  Display.getDefault().syncExec(new Runnable()<br />
  {<br />
    public void run()<br />
    {<br />
      Shell shell = getShell();<br />
      if (shell != null)<br />
      {<br />
        if (!shell.isDisposed())<br />
        {<br />
          shell.dispose();<br />
        }<br />
      }<br />
    }<br />
  });<br />
}<br />
</code></li>
<li>C#<br />
<code>delegate void GUICallback(string pos);<br />
//Function declaration.<br />
//Please note the prototype of the function is certain:<br />
//the return value is void and the input parameter is string.<br />
private void closeDialogInner(string strMessage)<br />
{<br />
  if (this.InvokeRequired)<br />
  //This is a system function.<br />
  //If this function needs to access some control resources,<br />
  //please change "this" to the name of the control,<br />
  //for example: this.m_btnOK.InvokeRequired.<br />
  {<br />
    GUICallback callback = new GUICallback(closeDialogInner);<br />
    this.Invoke(callback, new object[] { strMessage });<br />
  }<br />
  else<br />
  {<br />
    this.Close();<br />
  }<br />
}<br />
</code></li>
</ul>
</li>
<li>Replace Display.getDefault().getActiveShell() with Form.ActiveForm(). This function may be not used much.</li>
<li>Use &#8220;is&#8221; instead of &#8220;instanceof&#8221;.</li>
<li>Replace Integer.MAX_VALUE with int.MaxValue and replace Long.MAX_VALUE with long.MaxValue.</li>
<li>An important thing: please keep the variables of interfaces&#8217; controls consistent.
<p>Don&#8217;t change logic. Don&#8217;t comment codes if you don&#8217;t need to. Please try to convert a function at a dash.<br />
These are the recommended steps:</p>
<ul>
<li>Transfer util class.</li>
<li>Transfer IView class.</li>
<li>Draw dialog boxes. Please make sure the variables of the control names in C# and Java are the same.</li>
<li>Implement the functions in IView.</li>
<li>Convert the controller classes.
<ul>
<li>Convert thread classes</li>
<li>Convert the Dialog control classes</li>
</ul>
</li>
<li>Add events for controls</li>
<li>Copy the implementing code of Copy event.<br />
One thing to notice: The constructor of Form calls InitializeComponent() directly, but in Java, createContents is called only when openDialob, so the time to create controls are different in C# and Java. The time to call FormLoad(…) method in C# is similar to that of createContents in Java.</li>
</ul>
</li>
<li>Replace &#8220;final&#8221; in local constant with &#8220;const&#8221;.</li>
<li>Omit &#8220;final&#8221; in parameters.</li>
<li>Use &#8220;public const&#8221; instead of &#8220;public final static&#8221;.</li>
<li>Replace &#8220;length&#8221; with &#8220;Length&#8221; in the member of array&#8217;s length.</li>
<li>Using Long:
<ul>
<li>Using Long= System.Int64;</li>
<li>Integer.MaxValue-&gt;Integer.MAX_VALUE</li>
</ul>
</li>
<li>Using Integer:
<ul>
<li>Using Integer = System.Int32</li>
<li>Long.MaxValue-&gt;Long.MAX_VALUE</li>
</ul>
</li>
</ul>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/an-example.html">An example</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-write-java-code.html">How to write Java code?</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/how-to-write-csharp-code.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An example</title>
		<link>http://www.kevingao.net/csharp-java-conversion/an-example.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/an-example.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 06:13:44 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=672</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!
Below is a piece of code of a method. In the sample, CString, a class defined in the CSharpJavaMerger Framework, is used instead of String. This way, the method AddTwoValues can be used in both C# and [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p>Below is a piece of code of a method. In the sample, <strong>CString</strong>, a class defined in the CSharpJavaMerger Framework, is used instead of <strong>String</strong>. This way, the method <strong>AddTwoValues</strong> can be used in both C# and Java.</p>
<p><code>public void AddTwoValues()<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;try<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CString strValue1 = m_mainForm.GetFirstTextBoxValue();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CString strValue2 = m_mainForm.GetSecondTextBoxValue();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int iValue1 = strValue1.ToInteger();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int iValue2 = strValue2.ToInteger();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int iResult = iValue1 + iValue2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CString strShowResult = CString.ValueOf(iResult);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_mainForm.ShowResult(strShowResult);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CString strSaveResult = new CString(strValue1.GetValue() + " + " + strValue2.GetValue() + " = " + strShowResult.GetValue() + "\n");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_mainForm.SaveResult(strSaveResult);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;catch (Exception ee)<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_mainForm.SaveResult(new CString(ee.Message + "\n"));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_mainForm.ShowResult(new CString("Error"));<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></p>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/architecture.html">Architecture</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-write-csharp-code.html">How to write C# code?</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/an-example.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Architecture</title>
		<link>http://www.kevingao.net/csharp-java-conversion/architecture.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/architecture.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 06:08:08 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=670</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!

(CSharpJavaMerger Framework Architecture)
 
Links:
Previous article &#62;&#62;&#62;&#62;: I&#8217;m a Java developer. How to use CSharpJavaMerger?
Next article &#62;&#62;&#62;&#62;: An example
WCF &#38; Java Interop series home page: CSharpJavaMerger Framework
]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p><img src="http://www.kevingao.net/wp-content/uploads/csharp-java-conversion/csharpjavamerger-architecture" alt="CSharpJavaMerger Framework Architecture" /><br />
(CSharpJavaMerger Framework Architecture)</p>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-java-developer.html">I&#8217;m a Java developer. How to use CSharpJavaMerger?</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/an-example.html">An example</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/architecture.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m a Java developer. How to use CSharpJavaMerger?</title>
		<link>http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-java-developer.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-java-developer.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 06:00:29 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=668</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!
If you are a Java developer, you can use CSharpJavaMerger Framework.java to develop the Java code and then the code can be used by C# with little modifications with the help of CSharpJavaMerger Framework.dll. See How to [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p>If you are a Java developer, you can use CSharpJavaMerger Framework.java to develop the Java code and then the code can be used by C# with little modifications with the help of CSharpJavaMerger Framework.dll. See <a href="http://www.kevingao.net/csharp-java-conversion/how-to-write-java-code.html">How to write Java code</a> for more info.</p>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-csharp-developer.html">I&#8217;m a C# developer. How to use CSharpJavaMerger?</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/architecture.html">Architecture</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-java-developer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m a C# developer. How to use CSharpJavaMerger?</title>
		<link>http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-csharp-developer.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-csharp-developer.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 05:56:25 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=665</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!
If you are a C# developer, you can use CSharpJavaMerger Framework.dll for C# coding so that the C# code can be used by Java easily later. After you complete the C# code, you can change the .cs [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p>If you are a C# developer, you can use CSharpJavaMerger Framework.dll for C# coding so that the C# code can be used by Java easily later. After you complete the C# code, you can change the .cs file extension to be .java, import the CSharpJavaMerger Framework.java and do compilation. There are some differences between C# and Java that are not consolidated in the framework, such as C# uses namespace while Java uses package. You can make such changes manually. See <a href="http://www.kevingao.net/csharp-java-conversion/how-to-write-csharp-code.html">How to write C# code</a> for more info.</p>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/get-source-code.html">Get source code</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-java-developer.html">I&#8217;m a Java developer. How to use CSharpJavaMerger?</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-csharp-developer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get source code</title>
		<link>http://www.kevingao.net/csharp-java-conversion/get-source-code.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/get-source-code.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 05:45:43 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=661</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!
All the source code of CSharpJavaMerger Framework is stored in SCM Anywere Hosted repositories.
You can download the SCM Anywhere Hosted Client from link below and use the following account to log in the hosted server to get [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p>All the source code of CSharpJavaMerger Framework is stored in SCM Anywere Hosted repositories.</p>
<p>You can download the SCM Anywhere Hosted Client from link below and use the following account to log in the hosted server to get source code.</p>
<p><a href="http://www.dynamsoft.com/Downloads/SCMHosted_Download.aspx">Downlad SCM Anywhere Hosted Client</a><br />
<strong>Organization ID:</strong> 101968<br />
<strong>User Name:</strong> Dynamsoft<br />
<strong>Password:</strong> scm</p>
<p>You can get all the source code from the <a href="http://www.scmsoftwareconfigurationmanagement.com/help/SCM%20Hosted/Source-Control/Source-Control-Explorer.htm">Source Control Explorer</a>.</p>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/download.html">Download</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/how-to-use-csharpjavamerger-for-csharp-developer.html">I&#8217;m a C# developer. How to use CSharpJavaMerger?</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/get-source-code.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Download</title>
		<link>http://www.kevingao.net/csharp-java-conversion/download.html</link>
		<comments>http://www.kevingao.net/csharp-java-conversion/download.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 05:33:55 +0000</pubDate>
		<dc:creator>Kevin Gao</dc:creator>
				<category><![CDATA[C# & Java conversion]]></category>

		<guid isPermaLink="false">http://www.kevingao.net/?p=653</guid>
		<description><![CDATA[This article is a part of CSharpJavaMerger Framework, an open source project. Join us now to make it better!
CSharpJavaMerger Framework.dll
CSharpJavaMerger Framework.java
 
Links:
Previous article &#62;&#62;&#62;&#62;: News
Next article &#62;&#62;&#62;&#62;: Get source code
WCF &#38; Java Interop series home page: CSharpJavaMerger Framework
]]></description>
			<content:encoded><![CDATA[<div style="padding-right: 10px; padding-left: 13px; float: right; padding-bottom: 13px; margin-left: 8px; width: 210px; padding-top: 13px; background-color: #f5f5f5; text-align: left; border: #808080 1px dotted;"><strong>This article is a part of <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a>, an open source project. <a href="http://www.kevingao.net/csharp-java-conversion/get-involved.html">Join us now</a> to make it better!</strong></div>
<p><a href="http://www.kevingao.net/wp-content/uploads/csharp-java-conversion/csharpjavamerger.zip">CSharpJavaMerger Framework.dll</a></p>
<p><a href="http://www.kevingao.net/wp-content/uploads/csharp-java-conversion/csharpjavamerger.jar">CSharpJavaMerger Framework.java</a></p>
<p> </p>
<p><strong>Links:</strong><br />
Previous article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/news.html">News</a><br />
Next article &gt;&gt;&gt;&gt;: <a href="http://www.kevingao.net/csharp-java-conversion/get-source-code.html">Get source code</a><br />
WCF &amp; Java Interop series home page: <a href="http://www.kevingao.net/csharp-java-conversion">CSharpJavaMerger Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevingao.net/csharp-java-conversion/download.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
