<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[we developers forum - Convert between C# and Java with CSharpJavaMerger]]></title>
	<link rel="self" href="http://forum.wedevs.com/feed/atom/topic/48/"/>
	<updated>2009-10-14T08:03:17Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.wedevs.com/topic/48/convert-between-c-and-java-with-csharpjavamerger/</id>
		<entry>
			<title type="html"><![CDATA[Re: Convert between C# and Java with CSharpJavaMerger]]></title>
			<link rel="alternate" href="http://forum.wedevs.com/post/221/#p221"/>
			<content type="html"><![CDATA[Thanks for the great posting :)]]></content>
			<author>
				<name><![CDATA[Tareq]]></name>
				<uri>http://forum.wedevs.com/user/2/</uri>
			</author>
			<updated>2009-10-14T08:03:17Z</updated>
			<id>http://forum.wedevs.com/post/221/#p221</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Convert between C# and Java with CSharpJavaMerger]]></title>
			<link rel="alternate" href="http://forum.wedevs.com/post/220/#p220"/>
			<content type="html"><![CDATA[CSharpJavaMerger is an open source tool. It provides common interfaces of C# and Java and enables you to write one set of code which can be used both by C# and Java.

Below is a method that can be used in both of C# and Java. In the sample, CString is a class defined in the CSharpJavaMerger Framework. 

[code]public void AddTwoValues()
{
    try
    {
        CString strValue1 = m_mainForm.GetFirstTextBoxValue();
        CString strValue2 = m_mainForm.GetSecondTextBoxValue();

        int iValue1 = strValue1.ToInteger();
        int iValue2 = strValue2.ToInteger();
        int iResult = iValue1 + iValue2;
        CString strShowResult = CString.ValueOf(iResult);
        m_mainForm.ShowResult(strShowResult);
        CString strSaveResult = new CString(strValue1.GetValue() + " + " + strValue2.GetValue() + " = " + strShowResult.GetValue() + "\n");
        m_mainForm.SaveResult(strSaveResult);
    }
    catch (Exception ee)
    {
        m_mainForm.SaveResult(new CString(ee.Message + "\n"));
        m_mainForm.ShowResult(new CString("Error"));
    }
} 
[/code]
More info on CSharpJavaMerger: [url]http://www.kevingao.net/csharp-java-conversion[/url]]]></content>
			<author>
				<name><![CDATA[sindy55]]></name>
				<uri>http://forum.wedevs.com/user/75/</uri>
			</author>
			<updated>2009-10-14T06:08:34Z</updated>
			<id>http://forum.wedevs.com/post/220/#p220</id>
		</entry>
</feed>
