Hot answers tagged

4

=> instead of the { } This is personal preference. My preference, for example, is to generally use { } because I like it more, stylistically. I will say if it's more than a line, using => (again, in my opinion) becomes hard to read I'm not pretty sure about the keywords const and readonly const is used for compile time constants and readonly are for ...


1

Future note: avoid making Code Review request for not finished yet solution. Few notes: What I'm really missing here: Asynchronous programming There's no reason to stay in ASCII, use UTF8 instead. Also ASCII is subset of UTF-8. You run receiving packet once and then nothing. You aren't return data anywhere, why? Buffer.BlockCopy is really fast but reading ...


1

private async void Form1_Load Why async without await? Remove async. The query can be a constant like const string queryPattern = @" SELECT * FROM __InstanceOperationEvent WITHIN {0} WHERE TargetInstance ISA 'Win32_Process' AND TargetInstance.Name = '{1}'"; Then you can reuse it multiple times. But you may modify the query to catch event for ...


Only top voted, non community-wiki answers of a minimum length are eligible