Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
Question(Reflection)How do I use PropertyInfo of Index property? Pin
Konrad Rotuski9-May-03 13:10
Konrad Rotuski9-May-03 13:10 
AnswerRe: (Reflection)How do I use PropertyInfo of Index property? Pin
Burt Harris11-May-03 11:29
Burt Harris11-May-03 11:29 
GeneralReading/Writing Cab Files Pin
John Pepper9-May-03 7:57
John Pepper9-May-03 7:57 
GeneralRe: Reading/Writing Cab Files Pin
J. Dunlap9-May-03 9:41
J. Dunlap9-May-03 9:41 
GeneralRe: Reading/Writing Cab Files Pin
John Pepper9-May-03 11:30
John Pepper9-May-03 11:30 
GeneralRe: Reading/Writing Cab Files Pin
Stephane Rodriguez.9-May-03 20:33
Stephane Rodriguez.9-May-03 20:33 
GeneralInterfacing with C from C# Pin
Hashim Saleem9-May-03 7:43
Hashim Saleem9-May-03 7:43 
GeneralRe: Interfacing with C from C# Pin
Katalyst9-May-03 8:16
Katalyst9-May-03 8:16 
You can declare C functions in C# using the extern keyword along with the DllImport attribute. Once the function is declared, you just call into it. For example:

using System.Runtime.InteropServices;
<P>

[DllImport("User32.dll")]
public static extern int MessageBox(int h, string m, string c, int type);
<P>

MessageBox (0,"API Message Box","API Demo",0);


See the following and other articles on the topic:

http://www.thecodeproject.com/csharp/c__and_api.asp

There is no need for headers in C#. You just put all your code in the .cs class. You generally wrap your code within a namespace as a way of organizing things and to avoid name conflicts with other code -- it doesn't really correspond to a header.
GeneralRe: Interfacing with C from C# Pin
Hashim Saleem9-May-03 9:59
Hashim Saleem9-May-03 9:59 
GeneralRe: Interfacing with C from C# Pin
Stephane Rodriguez.9-May-03 11:05
Stephane Rodriguez.9-May-03 11:05 
GeneralRe: Interfacing with C from C# Pin
Hashim Saleem10-May-03 14:03
Hashim Saleem10-May-03 14:03 
GeneralRe: Interfacing with C from C# Pin
Stephane Rodriguez.10-May-03 19:18
Stephane Rodriguez.10-May-03 19:18 
QuestionIs there really no usefull ListView Owner Draw Example in this world!!!??? Pin
STW9-May-03 7:07
STW9-May-03 7:07 
GeneralTitle for taskbar button Pin
Manish K. Agarwal9-May-03 6:11
Manish K. Agarwal9-May-03 6:11 
GeneralDetermining Memory Size Pin
Mark Sanders9-May-03 5:39
Mark Sanders9-May-03 5:39 
GeneralRe: Determining Memory Size Pin
Stephane Rodriguez.9-May-03 8:34
Stephane Rodriguez.9-May-03 8:34 
General3d Party Controls Pin
RB@Emphasys9-May-03 5:13
RB@Emphasys9-May-03 5:13 
GeneralRe: 3d Party Controls Pin
Stefan de Zeeuw10-May-03 2:16
professionalStefan de Zeeuw10-May-03 2:16 
Questioncombobox item values? Pin
dazinith9-May-03 3:39
dazinith9-May-03 3:39 
AnswerRe: combobox item values? Pin
RB@Emphasys9-May-03 9:13
RB@Emphasys9-May-03 9:13 
GeneralRe: combobox item values? Pin
dazinith9-May-03 9:39
dazinith9-May-03 9:39 
GeneralRe: combobox item values? Pin
RB@Emphasys9-May-03 9:49
RB@Emphasys9-May-03 9:49 
GeneralRe: combobox item values? Pin
dazinith9-May-03 9:52
dazinith9-May-03 9:52 
GeneralRe: combobox item values? Pin
dazinith14-May-03 8:25
dazinith14-May-03 8:25 
GeneralRe: combobox item values? Pin
dazinith14-May-03 8:47
dazinith14-May-03 8:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.