Click here to Skip to main content
15,892,809 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Coding vent post Pin
jeron18-Dec-21 4:23
jeron18-Dec-21 4:23 
GeneralRe: Coding vent post Pin
honey the codewitch8-Dec-21 4:33
mvahoney the codewitch8-Dec-21 4:33 
GeneralRe: Coding vent post Pin
jeron18-Dec-21 4:47
jeron18-Dec-21 4:47 
GeneralRe: Coding vent post Pin
honey the codewitch8-Dec-21 5:23
mvahoney the codewitch8-Dec-21 5:23 
GeneralRe: Coding vent post Pin
jeron18-Dec-21 5:28
jeron18-Dec-21 5:28 
Generalmy first source code generator, yea!.. and a question Pin
Super Lloyd7-Dec-21 13:06
Super Lloyd7-Dec-21 13:06 
GeneralRe: my first source code generator, yea!.. and a question Pin
honey the codewitch7-Dec-21 14:32
mvahoney the codewitch7-Dec-21 14:32 
GeneralRe: my first source code generator, yea!.. and a question Pin
Super Lloyd7-Dec-21 15:43
Super Lloyd7-Dec-21 15:43 
I decided my option is better.. because it's better to waste (negligible) time on user action (when they change the current culture) instead of while simply viewing data.

honey the codewitch wrote:
Why the nullable string type though?

It's just the new syntactic sugar with nullable reference type (which is just a compiler hint, not a runtime truth). Arguably it's true they wont be null because the default culture dictionary will not be empty (with the way it's constructed). null string never bothered me, so I didn't give it a thought.. but yea.. it might a nice touch.

honey the codewitch wrote:
Have you considered using Lazy<T>

Well this is clearly counter productive, because the whole point of this generator is that the culture might (will?) change. Lazy have fixed value!
(I particularly wants live change notification since I opened a software in a unintelligible foreign language and I tried to make it English, turns out I had to find the language menu, select "english" and restart... Thanks google or I would have given up)

What you might suggest (and was contemplating) is to have my properties like so instead. Which remove the need for UpdateValues(), this is also more like the MS one is doing it.
C#
public static string? hello => GetResource("hello", GetDictionaries(Culture));
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!


modified 7-Dec-21 22:01pm.

GeneralRe: my first source code generator, yea!.. and a question Pin
honey the codewitch7-Dec-21 15:53
mvahoney the codewitch7-Dec-21 15:53 
GeneralRe: my first source code generator, yea!.. and a question Pin
Super Lloyd7-Dec-21 16:01
Super Lloyd7-Dec-21 16:01 
GeneralRe: my first source code generator, yea!.. and a question Pin
Super Lloyd7-Dec-21 16:12
Super Lloyd7-Dec-21 16:12 
GeneralRe: my first source code generator, yea!.. and a question Pin
honey the codewitch7-Dec-21 16:55
mvahoney the codewitch7-Dec-21 16:55 
GeneralRe: my first source code generator, yea!.. and a question Pin
Super Lloyd7-Dec-21 21:49
Super Lloyd7-Dec-21 21:49 
GeneralRe: my first source code generator, yea!.. and a question Pin
Richard Deeming7-Dec-21 22:32
mveRichard Deeming7-Dec-21 22:32 
GeneralRe: my first source code generator, yea!.. and a question Pin
Super Lloyd7-Dec-21 22:47
Super Lloyd7-Dec-21 22:47 
GeneralAn interesting blockchain read PinPopular
David O'Neil7-Dec-21 5:18
professionalDavid O'Neil7-Dec-21 5:18 
GeneralRe: An interesting blockchain read Pin
raddevus7-Dec-21 5:31
mvaraddevus7-Dec-21 5:31 
GeneralRe: An interesting blockchain read PinPopular
Fabio Franco8-Dec-21 0:00
professionalFabio Franco8-Dec-21 0:00 
GeneralRe: An interesting blockchain read Pin
raddevus8-Dec-21 3:14
mvaraddevus8-Dec-21 3:14 
GeneralRe: An interesting blockchain read Pin
Yortw8-Dec-21 8:44
Yortw8-Dec-21 8:44 
GeneralRe: An interesting blockchain read Pin
raddevus8-Dec-21 9:07
mvaraddevus8-Dec-21 9:07 
GeneralRe: An interesting blockchain read Pin
Gerry Schmitz7-Dec-21 6:16
mveGerry Schmitz7-Dec-21 6:16 
GeneralRe: An interesting blockchain read Pin
Fabio Franco8-Dec-21 0:07
professionalFabio Franco8-Dec-21 0:07 
GeneralRe: An interesting blockchain read Pin
Fabio Franco8-Dec-21 0:04
professionalFabio Franco8-Dec-21 0:04 
GeneralRe: An interesting blockchain read Pin
trønderen8-Dec-21 3:22
trønderen8-Dec-21 3:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.