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 am programing a game and want to save a couple of variables that are bool type. All of the values are stored In class named "Variables". can it be done without using external files if possible?
If you're programming against the Windows Forms model you can look into saving such simple data in the Application settings. This will alleviate some learning curve on serialization.
Take a look here for some insight: Best practice to save application settings in a Windows Forms Application
If the save game data is going to get more complex you'll probably want to start searching for info on XmlSerializer, JSON serialization, or if you need your data concealed from prying eyes: BinarySerializer
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 10 hours ago.
Improve this question
I checked on internet but was unable to find how can I add both F# and C# file in .net maui with visual studio. I was making an application that require F# for calculation and C# (for various reasons like saving data to JSON, easier development, etc.)
I tried integrating C# with python but failed several times due to different errors. So ended up with F#. I was expecting to be able to use GUI, data saving to JSON and calculation together in my application.
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 days ago.
Improve this question
I'm trying to create a c# program that automates operations on IMDb (looks up a title and then adds it to a user's private list). I'd prefer to use c# because this last part of a program that also does other operations, but if it should be too difficult I might also be forced to use another language (python). As said before I really would like to use c# but I really don't know where to start, from what I understand I should use the "tags" in the html page, but I'm open to suggestions on how to proceed
site: https://www.imdb.com/
I tried to use a Chrome extension to parse the page and find the way to choose the right html button but i don't know how to go about it (i'm just a beginner in c# and i wanted to learn something by doing this little project)
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
I would like to initialize a record from a class. For example, I read in a bunch of objects from a ReST call. These objects should be immutable, so the record type would fit the bill nicely, but I want to write a bunch of code to convert them to records.
Suggestions?
I'm assuming you don't have write access to the API that creates the classes? Because, honestly, it would probably better just to rewrite that.
There are libraries available such as AutoMapper (https://github.com/AutoMapper/AutoMapper).
Beyond that, there are no casts you can use, and unless the classes are highly regular, you need to write custom conversions for each class.
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
For my job i have to make many small projects that require to send different mails and set up some html. I usually make these forms in Winforms. Now at this moment whenever i need to fill my html I take the string replace some values and have functions that write hardcoded table rows.
To make my job a little easier I was wondering if it was possible to import the razor engine(not sure if it's the right word choice) in my winforms project and simply pass a model to a CSHTML file which returns me the HTML in a string so i can mail it to coworkers.
If this is possible, instructions on how to do it are welcome.
Kind Regards Roxas
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
Once I needed to modify a variable that was inside another application in order to modify its behavior.
I wonder whether its possibile to create an application that will get access to another process running on the same computer and modify some variable value. Process is a native one, and the application is written in c++. Do you know some good tutorials that help to achieve this?
I think you are looking for WriteProcessMemory function, take a look on this
You can use shared memory for this but this is more of an advanced concept: How to implement shared memory in .NET?
You can have a look at other alternatives: Passing data between C++ (MFC) app and C#