Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have read the other topics but there is apparently no way to do it,
is it possible to use C code in C# Project without using dll ?
It depends on how you are defining "use" and "C code" but the basic answer is No. You certainly can't just include a C header file or call native C functions.
You can however write code that looks like C in C# (still using pointers and such), you just need to be in unsafe mode. Note that any C standard methods would not be available and some syntactic changes would be necessary if you were pasting in C source. This is also considered bad practice; you should be writing in normal C# 99.99999% of the time.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I need to create an "if" statement but with a different name. Something that I could type instead of "if" but would work exact the same way.
I'm pretty sure you could do this in C and C++ by use of macros.
Such a usage could have looked something like this;
#define FagCelDev if
This is not available in C#. According to this source this was a decision made to help keep the language readable. I would suggest that they made a good decision. There is no good reason to do what you are proposing - it will just make your code less readable.
Doing things like this is a highly effective way to confuse yourself when you read your code in a year.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to raise an event in one .dll that can be handled by another? If so, what should I be looking at.
EDIT:
I think the two dlls are running in the same process - they are both add-ins to another program. I'm limited to what I can do with add-ins, hence the need to have this communication.
I thought about writing to a local file and reading it from the other dll, but how would I know when to read it.
It's called Interprocess Communication
You probably would like to look on Pipes, or look into the IpcChannel Class, which may make things even easier. I personally didn't use any of those under C# language, but what important, is an idea and technology behind, the rest is an implementation detail.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Please, can I convert a c# DLL to vb DLL, My problem is when I try to use svg.dll written in c# with a vb Code, Single and Float Types don't much, Any Help or suggestion !
Good news: There is no need to convert! A .NET DLL is neither a C# DLL nor a VB.NET DLL, it's simply a .NET DLL. You can use DLLs created with C# in VB.NET and vice-versa.
(Apparently, you have some specific issue using a third-party DLL. Now that you know that "the language of the DLL" is not the problem, I suggest that you start a new question about that and explain the problems you are having in detail. Beware of the XY problem!)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have an application of live broadcaster in C/C++ with lots of API and Graphics. now i have to make design in C#
. please help me how to integrate both. Thanks in advance
You can create a dll project in C++ and import the C++ dll into C# project. For more details, you can refer to:
http://msdn.microsoft.com/en-us/magazine/cc164123.aspx
If you want to use C++ in c# code directly, you can create a CLR(C++/CLI) project, then you can write c++ and c# code in the same project. For more details, please refer to:
http://msdn.microsoft.com/en-us/magazine/cc163852.aspx
and
http://www.codeproject.com/KB/mcpp/cppcliintro01.aspx
There are two options:
Create a C interfaces and the call methods using PInvoke
Create a C++/CLI wrapper
See this answer for more information
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
There is an existing python lib which i have to instantiate in my C# code.
Which is the best possible way to do so? And how?
I am not much familiar with python, so IronPython, py2exe confused me big time.
Please Help.
You'll almost certainly be better off finding a C#/.NET alternative to that library. What is it?
If you do really need to do this your best option will be IronPython. There are a few guides to embedding IronPython code in C#, such as this one.