Add String Conversion Function

This commit is contained in:
GuilhermeWerner
2021-04-18 20:15:00 -03:00
parent 293aef9dbf
commit d51196ff4b
7 changed files with 75 additions and 0 deletions

View File

@ -11,6 +11,9 @@ namespace CSharp
const string Library = "libLibrary";
#endif
[DllImport(Library)]
static extern string Hello(string input);
[DllImport(Library)]
static extern float Add(float Num1, float Num2);
@ -25,6 +28,14 @@ namespace CSharp
static void Main(string[] args)
{
// Hello
string result = Hello("C#");
Console.WriteLine(result);
// Operations
int num1 = 1;
int num2 = 2;