What is the wrong with this code?
I simply want to show data from a datatable I have just made in a datagidview.
The code runs well but doesn't show the data. NB: the code written in c++ winforms 2022
I want to write a C++/CLI wrapper class library which can be utilized in both C++ and C# applications. Step by step procedure will be more helpful along with project configurations.Basically i want to consume the c++/cli dll in both the applications. i need to write a wrapper which will be compatible with both the applications
i could continue with constructing this switch case tree sort of thingy
but i'm wondering if i can make it simpler and maybe more like a pro ( )
i dont expect ready to go code just some tip/hint so i can find more info myself
If you were going to give descriptions of many cars then the switch/case logic is not a good choice. Each time you add another car you need to change / compile / redistribute your application. Your descriptions of cars and their features should be outside the program.
Look at the different kinds of ways that data can be stored, including but not limited to: tables, files, arrays and lists.
You want to choose one that works long term. How many different types of cars will you include? How often will you make changes including corrections, additions and deletions? How do you want to make those updates? All these ideas need to be considered before you can choose the best solution.
Iam using Vs2015, While I try to Open a file using OpenFileDialog, Iam receiving the error
"Unhandled exception of type" System.AccessViolationException" occoured in system.windows.forms.dll
Additional information: Attempted to read or write protected memory.This is often an indication other memory is currupt.
i made a library in c++/cli and beside a c# program calling it. Everything works fine when i compile on any cpu or x64 on my pc (x64os/x64proc). But if i compile for x86, c# part works fine, but when i use the c++/cli part i get the error "could not load file or assembly .... incorrect format" . I use user32.lib in the c++/cli, is it possible the problem come from here ?
I think it's ok, i activated copy reference to output project but i'm not sure it was that.