swig/Doc/Manual/CSharp.html
2003-06-16 22:49:34 +00:00

84 lines
2.3 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SWIG and C#</title>
</head>
<body bgcolor="#FFFFFF">
<a name="n1"></a><H1>15 SWIG and C#</H1>
<!-- INDEX -->
<ul>
</ul>
<!-- INDEX -->
The C# module has only recently been added to SWIG and is still in a state of development.
The C# module is very similar to the Java module, so until some documentation has been written,
please use the <a href="Java.html">Java documentation</a> as a guide to using SWIG with C#.
<p>
The most noteable differences to Java are the following:
<ul>
<li>
When invoking SWIG use the <tt>-csharp</tt> command line option instead of <tt>-java</tt>.
</li>
<li>
Typemap equivalent names:
<blockquote><pre>
jni -> ctype
jtype -> imtype
jstype -> cstype
javain -> csin
javaout -> csout
javainterfaces -> csinterfaces
javabase -> csbase
javaclassmodifiers -> csclassmodifiers
javacode -> cscode
javaimports -> csimports
javaptrconstructormodifiers -> csptrconstructormodifiers
javagetcptr -> csgetcptr
javafinalize -> csfinalize
</pre></blockquote>
</li>
<li>
Feature equivalent names:
<blockquote><pre>
javaconst -> csconst
javamethodmodifiers -> csmethodmodifiers
</pre></blockquote>
</li>
<li>
Pragma equivalent names:
<blockquote><pre>
pragma(java) -> pragma(csharp)
jniclassbase -> imclassbase
jniclassclassmodifiers -> imclassclassmodifiers
jniclasscode -> imclasscode
jniclassimports -> imclassimports
jniclassinterfaces -> imclassinterfaces
</pre></blockquote>
</li>
<li>
Special variable equivalent names:
<blockquote><pre>
$javaclassname -> $csclassname
$javainput -> $csinput
$jnicall -> $imcall
</pre></blockquote>
</li>
</ul>
<p>
The directory Examples/csharp has a number of examples.
If your SWIG installation went well Unix users should be able to type <tt>make</tt> in each example directory,
then <tt>ilrun runme</tt> (pnet C# compiler) or <tt>mono runme</tt> (Mono C# compiler) to see them running.
Some project files will be added soon for use with the Microsoft .NET C# compiler.
</body>
</html>