Ahhha! That solved my problems entirely. Now I can use the simple appsettings.cfg without issues. I saw there were TWO entries for create a .net project but couldn't see any differences. The first project that worked fine was probably this version and the second where it didn't work was probably...
I tried wpf several times in the past and I honestly hate the system. The application I'm trying to write is for only my use and since it is all for me then I get the windows system that I like.
As far as I can tell the appsettings.json file is only available for ASP programs (web programming)...
Well I think you are correct and that .net8 app.config doesn't work properly any more. I got as far as a routine to READ an appsettings.json file but cannot find any way to create one. I'm under the impression that there should be an item in the "add new" requester called something like App...
Your code looks almost identical to mine but for some reason mine doesn't work (.net 8). Must be a bug in vstudio. I will create a new simple app in vs2022 and copy ALL of your code to it and see if it works. If not then I'll try vs2019... if not then I am totally clueless about what to do.
Well I created a much simpler app to do the same thing. One form, two buttons, nothing else. I changed from passing around the key name to just hard coding it and using cut and paste to eliminate any possibility of a spelling or case difference between the write and the read. Still same thing -...
For some reason my last project had no problems setting and reading things in my config file (appname.exe.config) but for some reason in a new app I can write to the file but never read anything but blanks. Here's what I am doing. The config file automagically appears in the debug folder (I...
I'm trying to make a function to carry out SQL queries in my own libray but I can't figure out how to return the query result. Declaring the function "public static DataTable MyQuery(string sql) gives the error "public not valid". So I have to figure out how to get the data back to the caller in...
I've done a lot of thinking and figured out that I can use a single form as the controlling code (always present, doesn't close). If I do that I can set public variables there and just refer to them from other forms - almost like a global variable even though they aren't. I can have each child...
I'm familiar with amateur programming so I know about OOP and stuff (to a certain degree) but I'm not really liking having instances of everything and no global variables (I started using basic in the 1970s so I am biased). I've not done any real programming for probably 10 years but now I am on...
...approach or does anyone know a better way? An example of the C code is below.
static void
aaha_aux (
double lt,
double x, double y,
double *p, double *q)
{
static double last_lt = -3434, slt, clt;
double cap, B;
if (lt != last_lt) {
slt = sin(lt);
clt = cos(lt)...
I'm playing with async TCP to communicate between two applications. I'm having a heck of a time trying to figure out how actually be able to use TCP messages. Using an async callback I can receive messages but since the method is static I can't access it or call non static methods from it - so...
I didn't realize each resx file was compiled into a separate dll, I thought they were rolled into the program binary. Well that solves that problem.
Now I just have to figure out how to get inno installer to include them. Should be pretty simple.
thanks!
Just started getting into adding different languages for an app, just en-US and fr-CA so far but I'm already realizing that I really want the words/phrases in a text file so changes and corrections can be made without having to re-compile. Should I just dump the Globalization string handling and...
Ooh, I do have a real related question!
When I've added a child namespace as above (I2CCmd) I have to preface the actual commands (I2CReadByte() etc) with the class name. I want to get around having the double I2C bit I2CCmd.I2CReadByte() which I could do by making each actual command a class...
On a related note. Is there a simple way to pass a list of bytes to a method? I noticed in the shared library (I think it's just C) you could pass bytes using curly braces and the receiver would automatically treat that as an array of bytes. Like this pseudocode (don't know C sytnax)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.