« first day (3407 days earlier)      last day (1756 days later) » 

17:16
@Freerey string interpolation is a syntax feature, it has no runtime benefit and isnt required for anything other than static analyzers or stuff like that
Introduce a microservice :D
17:49
found a desktop environment for Jesus
 
2 hours later…
20:09
I'm running into an issue with xml deserialization -- Occasionally a consumer of my Library will attempt to deserialize some XML to an entity the xml doesn't describe (i know, PEBKAC, but I can't fix that one), so we get an entity with all of it's properties set to null.

Is there anyway to check for and protect against this, maybe by throwing an exception? I'm not terribly familiar with xml deserialization as an academic topic, I just know which questions on SO to copy and adapt to my needs.
All I can think of realistically is to make sure that all the elements in the XML tree are present in the object it gets deserialized to, but that's 1.) Gross 2.) Hacky 3.) Work
Do your XML objects have schemas on them?
It seems like there should be some data in your XML that says what kind of entity it is
Or do you just have to look at the structure of the thing?
I do have namespaces, which might be a start.
Thus far I've only been looking at the structure.
20:25
If wherever this XML is coming from put a handy namespace or entity name on them, which I sure hope they do, your job's mostly done.
👍Namespace checking will do! Thank you Grace!
 
1 hour later…
21:47
Hello. I'm trying to use C# to run a command "/C dir" on cmd and return the output of the command as a string. But when the command is run, the app seems to be stuck and I don't see any output. Can someone give me advice?

Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.UseShellExecute = false;
startInfo.RedirectStandardInput = true;
startInfo.RedirectStandardOutput = true;
startInfo.CreateNoWindow = true;
22:15
Nevermind, I was overwriting the arguments. Oops

« first day (3407 days earlier)      last day (1756 days later) »