c# Programming Glossary: never
Direct casting vs 'as' operator? http://stackoverflow.com/questions/132445/direct-casting-vs-as-operator you cannot use it with value types the operator could never return null in that case . Otherwise assigns o to s . Causes.. it's simple and straightforward. I tend to almost never use 2 since if something is not the right type I usually expect..
TransactionScope automatically escalating to MSDTC on some machines? http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines does not cause a transaction to be promoted. However whenever you open a second connection to a database causing the database.. SQL2008 and Dev 4 is actually SQL2005. That'll teach me to never trust my coworkers again. Because of this change in data I'm..
How to stop BackgroundWorker on Form's Closing event? http://stackoverflow.com/questions/1731384/how-to-stop-backgroundworker-on-forms-closing-event and wait for bgWorker to be done than .Invoke ... never returns also understandably. Any ideas how do I close this app..
Big integers in C# http://stackoverflow.com/questions/176775/big-integers-in-c-sharp from the J# libraries as described here . Having never used a library for working with large integers before this seems..
Why .NET String is immutable? [duplicate] http://stackoverflow.com/questions/2365272/why-net-string-is-immutable to be modelled by an Employee object whose salary could never ever change though sometimes even then it can be useful in a..
Tips for optimizing C#/.NET programs [closed] http://stackoverflow.com/questions/2473666/tips-for-optimizing-c-net-programs applicable to trivial or unrealistic situations. I have never once solved a real world performance problem through application..
Why is it important to override GetHashCode when Equals method is overridden? http://stackoverflow.com/questions/371328/why-is-it-important-to-override-gethashcode-when-equals-method-is-overridden If the hash code for two items does not match they may never be considered equal Equals will simply never be called . The.. they may never be considered equal Equals will simply never be called . The GetHashCode method should reflect the Equals..
Performance differences between debug and release builds http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds internally . When the JIT compiler can verify that a loop never indexes an array out of bounds then it will eliminate the index..
WebBrowser Control in a new thread http://stackoverflow.com/questions/4269800/webbrowser-control-in-a-new-thread is the thread end before the document is fully loaded so I never get to make use of the DocumentComplete event. How can I overcome..
Protect .NET code from reverse engineering? http://stackoverflow.com/questions/506282/protect-net-code-from-reverse-engineering to pirate your software. There are some people who are never going to pay for your application no matter what and these are.. There are however many businesses out there who would never risk a lawsuit and happily buy software licenses and many computer..
When to use struct in C#? http://stackoverflow.com/questions/521298/when-to-use-struct-in-c and Enumerator represent single values. Speed Entry is never passed as a parameter outside of the Dictionary class. Further..
Proper use of the IDisposable interface http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface It needs to be done at some point otherwise they will never be cleaned up. The garbage collector doesn't know how to call..
How do parameterized queries help against SQL injection? http://stackoverflow.com/questions/5468425/how-do-parameterized-queries-help-against-sql-injection it can't become part of what is executed becase the SQL is never injected into the resulting statement. share improve this answer..
Fastest Way of Inserting in Entity Framework http://stackoverflow.com/questions/5940225/fastest-way-of-inserting-in-entity-framework extremely over time. Many hours is an estimation I never finished this test I stopped at 50.000 entities after 20 minutes...
C# Events and Thread Safety http://stackoverflow.com/questions/786383/c-sharp-events-and-thread-safety the empty delegate on the member declaration so that you never need to check for null in the first place Updated In case it.. initializing the handler to have an empty action that is never removed. But doing a null check is the standard pattern. So..
LINQ to SQL: Updating without Refresh when ?œUpdateCheck = Never??/a> http://stackoverflow.com/questions/11189688/linq-to-sql-updating-without-refresh-when-updatecheck-never
Optimizing Repository?™s SubmitChanges Method http://stackoverflow.com/questions/11262785/optimizing-repositorys-submitchanges-method LINQ to SQL Updating without Refresh when œUpdateCheck Never a http www.sqlteam.com forums topic.asp TOPIC_ID 113917 CODE..
Is there a way to indefinitely pause a thread? http://stackoverflow.com/questions/142826/is-there-a-way-to-indefinitely-pause-a-thread c# .net multithreading share improve this question Never ever use Thread.Suspend . The major problem with it is that..
How to bind to a PasswordBox in MVVM http://stackoverflow.com/questions/1483892/how-to-bind-to-a-passwordbox-in-mvvm security guideline tattooed on the inside of their eyelids Never keep plain text passwords in memory. The reason the WPF Silverlight..
How to decide between MonoTouch and Objective-C? http://stackoverflow.com/questions/1583856/how-to-decide-between-monotouch-and-objective-c wusses. I was a QuickBasic dev in addition to the rest . Never give in to nerd machismo. If you don't like C and if you don't..
How to properly clean up Excel interop objects http://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects also has a nice rule for the usage of COM objects in C# Never use 2 dots with com objects. So with this knowledge the right..
Best Practice for Exception Handling in a Windows Forms Application? http://stackoverflow.com/questions/183589/best-practice-for-exception-handling-in-a-windows-forms-application preemptive check and the try catch finally as appropriate. Never swallow an exception except in the most well documented cases..
C# how to add Excel Worksheet programatically Office XP / 2003 http://stackoverflow.com/questions/193092/c-sharp-how-to-add-excel-worksheet-programatically-office-xp-2003 in that StackOverflow question is a useful rule of thumb Never use 2 dots with COM objects . In your example code above you're..
Dependency Inject (DI) “friendly” library http://stackoverflow.com/questions/2045904/dependency-inject-di-friendly-library DI terms says Don't call the DI Container it'll call you . Never directly ask for a dependency by calling a container from within..
What are reasons why one would want to use nested classes? [duplicate] http://stackoverflow.com/questions/3300051/what-are-reasons-why-one-would-want-to-use-nested-classes when I am not analyzing the semantics of a parse tree Never. That class is entirely an implementation detail of the semantic..
How to match hyphens with Regular Expression? http://stackoverflow.com/questions/4068629/how-to-match-hyphens-with-regular-expression this question Escape the hyphen. a zA Z0 9 t r n UPDATE Never mind this answer you can add the hyphen to the group but you..
Is it possible to dynamically compile and execute C# code fragments? http://stackoverflow.com/questions/826398/is-it-possible-to-dynamically-compile-and-execute-c-sharp-code-fragments
C# vertical label in a winform http://stackoverflow.com/questions/1371943/c-sharp-vertical-label-in-a-winform Control with vertical text. Note that ClearType text NEVER works if the text is not horizontal using System using System.Drawing..
Debug.Assert vs Exception Throwing http://stackoverflow.com/questions/1467568/debug-assert-vs-exception-throwing executes and it should be removed as dead code. It should NEVER be possible to produce a test case which causes an assertion..
Is it better to return null or empty collection? http://stackoverflow.com/questions/1969993/is-it-better-to-return-null-or-empty-collection arrgh It is considered a best practice to NEVER return null when returning a collection or enumerable. ALWAYS..
difference between throw and throw new Exception() http://stackoverflow.com/questions/2999298/difference-between-throw-and-throw-new-exception all stack trace information until your catch block. NEVER write throw ex throw new Exception ex.Message is even worse...
Bayer Ordered Dithering http://stackoverflow.com/questions/4441388/bayer-ordered-dithering BPP and for a long time it have had dithering included but NEVER ordered dithering and i thought it would be a nice addition..
Deserialization backwards compatibility http://stackoverflow.com/questions/5381928/deserialization-backwards-compatibility serialization share improve this question First never NEVER use the CLR's serialization functions for anything that resembles..
How do I find the current time and date at compilation time in .net/C# application? http://stackoverflow.com/questions/971476/how-do-i-find-the-current-time-and-date-at-compilation-time-in-net-c-applicati after 2000 01 01 MyVersion.Revision 2 seconds after 0 hour NEVER daylight saving time DateTime compileTime new DateTime 2000..
#ifdef in C# http://stackoverflow.com/questions/975355/ifdef-in-c-sharp on what i am debugging #else bool bypassCheck false NEVER bypass it #endif c# share improve this question #if DEBUG.. on what i am debugging #else bool bypassCheck false NEVER bypass it #endif Make sure you have the checkbox to define DEBUG..
|