c# Programming Glossary: does
Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on http://stackoverflow.com/questions/142003/cross-thread-operation-not-valid-control-accessed-from-a-thread-other-than-the main form which hosts some user control. The user control does some heavy data operation such that if I directly call the UserControl_Load..
How to properly clean up Excel interop objects http://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects interop com interop share improve this question Excel does not quit because your app is still holding references to COM..
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 group items into buckets. If the hash code for two items does not match they may never be considered equal Equals will simply..
Casting vs using the 'as' keyword in the CLR http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr If there is a difference is there a cost difference or how does this affect my program Hopefully this makes sense. Sorry for.. then the is operator is your friend. In this case it doesn't matter whether TargetType is a reference type or a value..
Use of Application.DoEvents() http://stackoverflow.com/questions/5181777/use-of-application-doevents rest of the app in much the same way that VB6's DoEvents does c# doevents share improve this question Hmya the enduring.. The same kind of wisdom as don't mutate a struct . Erm why does the runtime and the language supports mutating a struct if that's.. And doing it right requires knowing exactly what it does which in the case of DoEvents is definitely not easy to grok...
When to use struct in C#? http://stackoverflow.com/questions/521298/when-to-use-struct-in-c not be changed after creation. Do these rules work What does a struct mean semantically c# struct share improve this question.. that when a struct implements an interface as Enumerator does and is cast to that implemented type the struct becomes a reference.. ... 12ms . What happens is because Entry is a struct it does not require initialization like a reference type. This is both..
Proper use of the IDisposable interface http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface _theDict.clear _theList null _theDict null My question is does this make the garbage collector free memory used by MyCollection.. they will never be cleaned up. The garbage collector doesn't know how to call DeleteHandle on a variable of type IntPtr.. how to call DeleteHandle on a variable of type IntPtr it doesn't know whether or not it needs to call DeleteHandle . Note..
Random number generator only generating one random number http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number code all members of the mac array have equal value. Why does that happen c# random share improve this question Every.. happens internally is the bigger issue though since Random does not make any guarantees of thread safety. Thus there are two..
Deep cloning objects in C# http://stackoverflow.com/questions/78536/deep-cloning-objects-in-c-sharp incorporated it in our stuff. As mentioned elsewhere it does require your objects to be serializable. using System using..
What does the [Flags] Enum Attribute mean in C#? http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c does the Flags Enum Attribute mean in C# Anyone have a good explanation.. MyColor.Green MyColor.Blue Note that Flags by itself doesn't change this at all all it does is enable a nice representation.. that Flags by itself doesn't change this at all all it does is enable a nice representation by the .ToString method Flags..
Is there a way to check if a file is in use? http://stackoverflow.com/questions/876473/is-there-a-way-to-check-if-a-file-is-in-use being written to or being processed by another thread or does not exist has already been processed return true finally if..
C# - Capture screenshot of active window http://stackoverflow.com/questions/1163761/c-sharp-capture-screenshot-of-active-window active window and take a screenshot of this active window. Does anyone know how I can do this c# screenshot active window ..
Complex UI inside ListBoxItem http://stackoverflow.com/questions/15532639/complex-ui-inside-listboxitem View I wouldn't have to refactor the entire application 2 Does winforms support databinding in such a way that each of my ListBoxItems.. mode where you can see a lot of additional information 4 Does winforms support UI Virtualization in such a way that if I have.. Master Detail template with Save and edit Buttons 8 Does winforms provide a consistent and adequate Document Model that..
TransactionScope automatically escalating to MSDTC on some machines? http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines SQL Server it will immediately escalate to DTC SQL2005 Does not allow multiple connections within a single TransactionScope..
Big integers in C# http://stackoverflow.com/questions/176775/big-integers-in-c-sharp order of 10 times slower even for ulong length numbers. Does anyone have any better preferably free libraries or is this..
How to create a simple proxy in C#? http://stackoverflow.com/questions/226784/how-to-create-a-simple-proxy-in-c believe I do not want a reverse proxy but I am not sure . Does any of you have some explication or some information that will..
Windows service and timer http://stackoverflow.com/questions/246697/windows-service-and-timer I use System.Timers.Timer or System.Threading.Timer one Does it influence on something I am asking because I heard many evidences..
Using AES encryption in C# http://stackoverflow.com/questions/273452/using-aes-encryption-in-c-sharp find a nice clean example of using AES 128 bit encryption. Does anyone have some sample code c# aes rijndaelmanaged share..
Best practices for exception management in Java or C# http://stackoverflow.com/questions/409563/best-practices-for-exception-management-in-java-or-c-sharp exception being thrown How does it make sense to handle it Does the caller really care about the exception or do they just care..
Best practice to save application settings in a Windows Forms Application http://stackoverflow.com/questions/453161/best-practice-to-save-application-settings-in-a-windows-forms-application I would like to get as far away from it as possible. Does this mean that I should use a custom XML file to save configuration..
VS2010 does not show unhandled exception message in a WinForms Application on a 64-bit version of Windows http://stackoverflow.com/questions/4933958/vs2010-does-not-show-unhandled-exception-message-in-a-winforms-application-on-a projects are created with some strange default settings. Does anyone have an idea what's wrong with my project I tried checking..
Is there a CSS parser for C#? [closed] http://stackoverflow.com/questions/512720/is-there-a-css-parser-for-c and I'd rather not write one if I can reasonably avoid it. Does one exist c# css parsing share improve this question ExCSS..
How to check if a number is a power of 2 http://stackoverflow.com/questions/600293/how-to-check-if-a-number-is-a-power-of-2 true for the given wrong value 9223372036854775809 . Does anyone have any suggestion for a better algorithm c# algorithm..
How do I convert Word files to PDF programmatically? http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically of the proprietary type 2 000 a license or thereabouts. Does anyone know of any clean inexpensive preferably free programmatic..
In C#, why can't a List<string> object be stored in a List<object> variable http://stackoverflow.com/questions/6557/in-c-why-cant-a-liststring-object-be-stored-in-a-listobject-variable list of strings you are not violating the list of objects. Does anybody know or can test if such a cast is legal in C# share..
C# Finalize/Dispose pattern http://stackoverflow.com/questions/898828/c-sharp-finalize-dispose-pattern the webclient implements the IDisposable interface. Does this mean that the webclient indirectly uses unmanaged resources..
How to cancel a Task in await? http://stackoverflow.com/questions/10134310/how-to-cancel-a-task-in-await and it works to some point. The CancelNotification method DOES get called which makes you think the task was cancelled but..
How to call Java code from C#? http://stackoverflow.com/questions/129989/how-to-call-java-code-from-c IKVM It is really awesome. The only problem is that it DOES add ~30MB to the project. log4net and Spring .NET are available..
WPF window image updating from menuitem but not when in while loop http://stackoverflow.com/questions/17728671/wpf-window-image-updating-from-menuitem-but-not-when-in-while-loop for 5 loops to the same method the drawing on the bitmap DOES NOT DISPLAY until the loop is completed and then the 5th redrawn..
Compiler Ambiguous invocation error - anonymous method and method group with Func<> or Action http://stackoverflow.com/questions/2057146/compiler-ambiguous-invocation-error-anonymous-method-and-method-group-with-fun be saying in this case that overload resolution DOES consider return types which is something we want to avoid. The..
BackgroundWorkers never stop being busy http://stackoverflow.com/questions/2183520/backgroundworkers-never-stop-being-busy publicstring And the timeconsumingfunction DOES end. stepping into it in the debugger and running line per line..
Dispose, when is it called? http://stackoverflow.com/questions/2871888/dispose-when-is-it-called to null doesn't invoke Dispose either. The Deconstructor DOES work so the object get's deconstructed when it exits Test Ok..
STAThread missing, but it is there http://stackoverflow.com/questions/3584434/stathread-missing-but-it-is-there The problem with this error message is that my Main method DOES have the STAThread attribute attached to it. I am at a loss..
Using FileStream.Seek http://stackoverflow.com/questions/5201414/using-filestream-seek 100 2500 This was updated after the initial request. THIS DOES NOT GIVE THE EXPECTED RESULTS SeekMethod new int 5 3 Expected..
Why is The Iteration Variable in a C# foreach statement read-only? http://stackoverflow.com/questions/776430/why-is-the-iteration-variable-in-a-c-sharp-foreach-statement-read-only operator . Functionally it's equivalent to this which DOES compile foreach Position Location in Map We want to fudge the..
Field Initializer in C# Class not Run when Deserializing http://stackoverflow.com/questions/9419743/field-initializer-in-c-sharp-class-not-run-when-deserializing DataContract public class MyConcrete FIELD INITIALIZER DOES NOT RUN WHEN COMMENTED IN protected readonly Dictionary int..
|