Click here to Skip to main content
14,573,754 members

Comments by Thornik (Top 17 by date)

Thornik 26-Jan-16 15:37pm View
Wizard, thanks!! I met this solution before, but didn't pay attention to such clumsy code. And it's really what MS "architected"!! *face of russian Lavrov*
Thornik 15-Nov-14 8:01am View
Reason for my vote of 1 \n Restricting user's keystrokes is ALWAYS a bad idea! You build control which have to RETURN proper integer, not KEEP integer during all editing time! Feel the difference? Let user type what he wants, but INDICATE (with pink background) that value is not good. This can be done with one line of code just using old good RegExp!
Thornik 29-Jan-13 14:05pm View
Reason for my vote of 5 \n good work! It's boring, but important measures nobody wanna do. :) You did, thanks!!
Thornik 20-Sep-12 10:23am View
Reason for my vote of 5
I like it! Short and simple.
Thornik 20-Sep-12 10:20am View
Reason for my vote of 5
Never thought backup code can be so complex! Thanks for the tip! I write DB management program so your article will be very helpful, thanks.
Thornik 24-Jan-12 3:03am View
This is not simpler than Ctrl+C, Ctrl+V. Real "simplification" is when in code you have ONE LINE which present all necessary stuff.
Thornik 12-Jan-12 10:35am View
Andrew, I feel I upset you, sorry. My vote for 1 is not because it's "bad as 1", but "last I'll write for this purpose". First - code, second - optimizations. And if I really worry about speed, "variable backed Property" is my first choice. Esp. when there is a big risk to forget "this.InitializePropertyDefaults();". Deal? :)
Thornik 12-Jan-12 2:33am View
All these "solutions" have no meaning just by one reason: you have to call separate function to initialize values. From this point it has no difference with simple method which initializes properties. And I agree with cathal_mchale - making all those supersolutions just to make default value is a mess. 1-2 years and stupids from MS will make some sugar to write smth like this:
string prop { get; set = "123"; }
Thornik 12-Jan-12 2:26am View
Strongly speaking in this task I don't see ANY requirements, either for size or speed of code. But my aesthetic sense tells "make less and clear code". If nobody said Andrew Rissing made default values for properties, sure I'll spend around hour just to guess what purpose of this code at all. TOO much code.
Thornik 10-Jan-12 3:21am View
Reason for my vote of 1
Too much code for so simple problem.
Thornik 10-Jan-12 3:20am View
Reason for my vote of 5
Most simplest and useful solution.
Thornik 30-May-11 4:58am View
And?... Which alternative you prefer and why?
Thornik 8-May-11 16:06pm View
Ups! You won't believe, but now it works!! I'm crazy. :)
Yep, quotes was presented (I just copied command from page). Thanks!
Thornik 4-May-11 11:17am View
>>>> .ToString() != string.Empty

Hell, guys, what's year now? string.IsNullOrWhitespace!
Thornik 4-May-11 11:10am View
On my XP SP3 it complains "Error: Too many command-line parameters". :(
I checked what 'reg' utility accepts - all parameters are mentioned! Strange...
Thornik 8-Sep-10 5:13am View
Yep, your two lines example is definitely shorter than my in one line!
People, _I_ am looking like crazy or _YOU_ cannot see that "f.ShowDialog() ?? false" is the shortest solution?
Damn, I'll never hire people like you.
Thornik 20-Jul-10 6:23am View
Oh, OK, "if (frm.DialogResult.HasValue && frm.DialogResult.Value) " is much shorter and understandable. Got it! :)