AOA AOA AOA Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA > Software > Programming and Assembly Language

Programming and Assembly Language Please read this Topic's rules!!

Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 20th September, 2009, 10:35 PM
Member
 
Join Date: September 2009
Posts: 1

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 11:35 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 20th September, 2009, 11:04 PM
Gizmo's Avatar
Chief BBS Administrator
BassTeroids Champion, Global Player Champion, Aim & Fire Champion, Puzzle Maniax Champion, Othello Champion, Canyon Glider Champion, UFO Shoot Out Champion, Unicycle Challenge Champion, Zed Champion
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 14,940
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

Ya know, I really, REALLY don't like being used by someone as a cheap source of advertising, even when it's for open-source software. If you want to advertise, contact our sales department. If you want to contribute meaningful posts to our community, then do that. But don't just come in and blast your crap around without even bothering to at least ASK.
__________________
Avatar and sig graphic by Pitch. Subscribers!
Ask about a custom graphic or avatar today!
 
Later,
Gizmo
Thermal Diode Mod and Direct-Die Water Block
8-Cheetah 18GiB U-2 SCSI
MegaRAID Enterprise 1500/128MiB
Samsung SyncMaster 955DF
TTGI/Superflower TTS-520 PSU
 

 
AOA Team filesAOA Team wcgAOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 26th September, 2009, 08:47 AM
MUff1N's Avatar
Member
 
Join Date: October 2007
Location: Payson/AZ
Posts: 1,492

Thumbs up

You tell'm Giz!
__________________


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is MKV and how to convert MKV to MP4, AVI, WMV, MOV, MPG, 3GP, iPod, Zune, PSP e thanksday Digital Image, Photo, Video and Audio Editing. 5 24th March, 2009 08:31 AM
MIT research helps convert brain signals into action Daniel ~ Random Nonsense! 1 4th October, 2007 01:13 PM
O2 Xda IIs WM2003 to convert to Linux r0l0e Mobile Devices and Networking 2 1st November, 2005 03:52 PM


All times are GMT -5. The time now is 02:44 AM.


Copyright ©2001 - 2009, AOA Forums

Search Engine Friendly URLs by vBSEO 3.3.0