Hi, I'm in crisis for my final task.
First, can J# accept/filter only Sun's Java code?
I mean, J# has delegate, events, blablabla, while Java can't.
Can J# filter those?
Second, J# is somehow a little different compared to Java.
For example, it doesn't overload the conn.createStatement() method,
which is overloaded by Java.
I mean, how can I convert existing Java code(which takes parameters) to J#
code (which takes no parameters)?
Here's a sample J# code that wouldn't compile in Java:
import java.sql.*;
public class Test
{
public static void main(String [] args) throws Exception
{
try
{
Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");//RunTime error-1
Connection conn =
DriverManager.getConnection("jdbc

dbc:TestDatabas e");
Statement stt = conn.createStatement();//Compile error-1
try
{
stt.executeUpdate("Create Table t (primaryKey int
Primary key)");
}
catch(Exception err)
{
//the table already exist
}
/* Read all rows and columns*/
ResultSet rs = stt.executeQuery("Select * from t");
while (rs.next())
{
myPrint(rs.getObject(1));//RunTime error-2
}
System.in.read();
}
catch(Exception err)
{
myPrint("Error occured!!!");
err.printStackTrace();
System.in.read();
}
}
public static void myPrint(Object message)
{
System.out.println(message.toString());
}
}
Please help me!
Any library, code, or link is going to be appreciated.
If my explanation is not clear, you can tell it to csharpindonesia (AT) hotmail (DOT) com