Going native -- please help a newbie!!

A

almurph

Hi,

I want to use the C# "native" keyword to some C code as I want to
emulate the output from a fairly simple maths calculation.
I have never used this before and am unsure how to do it. Can anyone
provide me with simple wortked example or a website with equivalent
please? Do i have to install a C emulator environment (I'm on a window
box) or some sort of program to emaulte the C compiler or something?

If I'm asking the wrong questions its because I'm under some time
pressure and would appreciate any assistance/help/advice/overview that
you may be able to provide.

Thanks,
Al.
 
D

David Anton

The keyword you want is 'extern', not 'native' (you're thinking of Java).
See the post right next to your post titled 'DllImport' for an example.
--
David Anton
http://www.tangiblesoftwaresolutions.com
Convert C++ to C#, VB, or Java
Convert Java to C#, VB, or C++
Convert VB to C#, C++, Java, or Python
Convert C# to VB, C++, Java, or Python
 
I

Ignacio Machin ( .NET/ C# MVP )

Hi,

        I want to use the C# "native" keyword to some C code as Iwant to
emulate the output from a fairly simple maths calculation.
        I have never used this before and am unsure how to do it.Can anyone
provide me with simple wortked example or a website with equivalent
please? Do i have to install a C emulator environment (I'm on a window
box) or some sort of program to emaulte the C compiler or something?

        If I'm asking the wrong questions its because I'm under some time
pressure and would appreciate any assistance/help/advice/overview that
you may be able to provide.

Thanks,
Al.

FTY there is no "native" keyword in C#


I think you need to better explain what you are tryig to do and what
your problem is
 
P

Pavel Minaev

Hi,

        I want to use the C# "native" keyword to some C code as Iwant to
emulate the output from a fairly simple maths calculation.
        I have never used this before and am unsure how to do it.Can anyone
provide me with simple wortked example or a website with equivalent
please? Do i have to install a C emulator environment (I'm on a window
box) or some sort of program to emaulte the C compiler or something?

        If I'm asking the wrong questions its because I'm under some time
pressure and would appreciate any assistance/help/advice/overview that
you may be able to provide.

There is no "native" in C#, that's a Java keyword. The closest analog
C# has to that is "extern" keyword and "DllImport" attribute. Assuming
that it's what you mean, here's some more info on that:

http://msdn.microsoft.com/en-us/library/26thfadc.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top