|
Programming and Assembly Language Please read this Topic's rules!! |
![]() |
| LinkBack | Thread Tools | Rate Thread |
| |||
Convert between C# and Java with CSharp* CSharp* 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 CSharp* Framework. 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")); } } More info on CSharp* can be found in C# & Java conversion serial at ....
__________________ Last edited by Gizmo; 26th September, 2009 at 05:35 PM. |
| ||||
![]() You tell'm Giz! ![]()
__________________ ![]() ![]() ![]() EVGA GTX 470 SC 37% OC (855/1710/2004) 160.5Gbs 3DMark Vantage: P24352 3DMark 11: P5119 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Rate This Thread | |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MIT research helps convert brain signals into action | Daniel ~ | Random Nonsense! | 1 | 4th October, 2007 07:13 PM |
O2 Xda IIs WM2003 to convert to Linux | r0l0e | Mobile Devices and Networking | 2 | 1st November, 2005 09:52 PM |