csharp examples
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
25b125e1e0
commit
719959886d
12 changed files with 210 additions and 0 deletions
23
Examples/csharp/simple/runme.cs
Normal file
23
Examples/csharp/simple/runme.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
public class runme
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
// Call our gcd() function
|
||||
|
||||
int x = 42;
|
||||
int y = 105;
|
||||
int g = example.gcd(x,y);
|
||||
Console.WriteLine("The gcd of " + x + " and " + y + " is " + g);
|
||||
|
||||
// Manipulate the Foo global variable
|
||||
|
||||
// Output its current value
|
||||
Console.WriteLine("Foo = " + example.getFoo());
|
||||
|
||||
// Change its value
|
||||
example.setFoo(3.1415926);
|
||||
|
||||
// See if the change took effect
|
||||
Console.WriteLine("Foo = " + example.getFoo());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue