Is there a cleaner way to merge C++ and C# [closed] - c#

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 2 years ago.
Improve this question
I have an application i have designed and built in C# that uses some complex filtering. i have manually calculated filter values/parameters outside of my application and added them in. this method works temporarily, but ideally i want to generate my values inside my application. The values i generate come from C++. so my thought process is to create a standalone C++ application that i run from my C# application and generate the new values and save them into some .txt file that will automatically add the new filter in. is there a better way to do this without converting this code into C#?

Off the top of my head, here's a few ideas:
Like you suggested, you could save the values to a text file, and then read them in.
You could make the C++ program into a server, and connect the C# program to the C++ program over a TCP connection.
You could use a database like SQL Server to store the values.
I'm sure there's other ways to do it, but those are what came to mind.

Related

How to parse and extract c# class data [closed]

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 5 years ago.
Improve this question
I have a c# file as in .txt file format, I have to read it dynamically and extract all data available, I need a parser to idenitify
c# class instances,
C# class fields,
etc..
Can anyone have idea to do this in simple way ?
If your C# file is an actual, valid C# file, you could wrap it in a project inside a solution (very simple, one file project), and then compile it. From the EXE file that got generated, you could use reflection to extract types, fields and methods dynamically during runtime.
Another option is to write a basic text parser that recognizes C# keywords and understands what that metadata is, but I think that the first alternative is easier and faster to implement.

Local files or remote server [closed]

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 8 years ago.
Improve this question
I've developed a desktop application(Accountant App). This application is going to import invoices data and do a lot of other things. All data will be stored on remote database (SQL Server). This app needs some 'pre loaded data' to work properly, like a list containing a bunch of cities etc. My question is: Is better to have this data (cities, states, zipcodes) stored in the remote database or is better to use xml, csv files and deploy them with each individual instance of the application? This data will be updated eventually. And this data will be used frequently by the users.
Well you can either use an external file or store them in the database. I think storing it in the database is the better approach since you won't have to distribute another extra file and all of your data will be at one place. Don't forget to seed the data every time you clear the database though.

Generating COBOL code with C# [closed]

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 9 years ago.
Improve this question
I have to generate COBOL code with C# but I haven't got suitable ideas how I could tackle this problem.
The only idea which I have was to generate the COBOL code as plain text but I think this isn't really efficient.
Are there any other/better ways? Could anyone provide an approach for me?
I would be also glad to hear about the smallest tips.
For your information: The data, which I need for the COBOL code I get from a PDF file. Unfortunately I am not able to use Cobol.NET.
The main goal is that a user is able to open a PDF file in the C# program. This PDF file is an empty form where the user have to place several kind of data on it. After editing this form the user must press a button 'run'. The 'run'-button trigger an event which translate the data into COBOL code. Now the COBOL code should contain the data types, values and coordinates of the used fields (data). The coordinates identify the place where the fields should printed on the formular.
If you're using Visual Studio I'd suggest looking into T4 Templates. They allow you to specify the format of your output as it will appear and write C# to manipulate that output.

How to pass data using dll between projects [closed]

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 8 years ago.
Improve this question
I have a solution that has two projects, Windows Forms and Web API. I need to pass some data that I've collected in windows form to Web API, is it possible using dll, if so how?
How can I start the Windows Forms from the Web API?
thk
the concept of DLL File is to link your program with a shared library that has its functions, methods, etc. to be reused with your piece of code..
You can't really pass "Data" through a DLL file, however, the simplest way to pass simple data from one program to another is using Input/Output files, you can just Write your data in a text file with the first Program (in this case the Windows Form) and read it with the second one (the Web API)

Display live scores [closed]

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
I am planning to design a website which displays the live scores of matches(NBA, AFL) etc. I would like to get scores, store them in my database and then display in my website. How can I accomplish this. Thanks in advance.
Thanks,
Sandeep.
Well first you need to decide how you're going to get the data. Is there a webservice that you can query? A document/webpage you can parse to get the information? Are you going to write a speech recognition device to interpret results from the radio or will you type it in by hand.
Then you need to get your database up and running, and whatever is reading your data (maybe it could be a windows service) can write the data into the database. Something like SQLExpress is quite good to try out.
Once you've got that you'll need to decide on your technology, ASP.NET or Silverlight are some good examples. You'll want to create some controls and then databind to the results from your database, which you could obtain using SQL expressions.

Categories