c# Programming Glossary: though
Elevating process privilege programatically? http://stackoverflow.com/questions/133379/elevating-process-privilege-programatically
TransactionScope automatically escalating to MSDTC on some machines? http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines grabbing from the connection pool. Why might this happen though Well if you use a SqlTableAdapter against that connection before..
Dependency Inject (DI) “friendly” library http://stackoverflow.com/questions/2045904/dependency-inject-di-friendly-library the best way to design the library so it is DI Agnostic Although adding basic support for one or two of the common DI libraries.. This principle is actually a quote from memory though from Design Patterns but it should always be your real goal..
Access to Modified Closure http://stackoverflow.com/questions/235455/access-to-modified-closure AccessToModifiedClosure The above seems to work fine though resharper complains that this is access to modified closure..
Why .NET String is immutable? [duplicate] http://stackoverflow.com/questions/2365272/why-net-string-is-immutable Interning and atomising being the most obvious examples though we can do other versions of the same principle. I once produced.. The main disadvantage is in requiring extra constructions though even here it's often overstated remember you have to do several.. by an Employee object whose salary could never ever change though sometimes even then it can be useful in a many web and other..
Tips for optimizing C#/.NET programs [closed] http://stackoverflow.com/questions/2473666/tips-for-optimizing-c-net-programs about gaining an understanding that performance should be thought about at least somewhat and that there's some common pitfalls.. there's some common pitfalls to look out for. I can see though that it might be useful to also know why a tip is useful and..
Sending email in .NET through Gmail http://stackoverflow.com/questions/32260/sending-email-in-net-through-gmail host to send email I was thinking of sending the messages though my Gmail account. The emails are personalized emails to the..
C# generic constraint for only integers http://stackoverflow.com/questions/32664/c-sharp-generic-constraint-for-only-integers feature in an interview with Bruce Eckel. I have to admit though that I don't know how he thinks his proposed workaround will..
Performance differences between debug and release builds http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds compare it to the Release build. That only really matters though when the code is on your critical path the 5 to 10 of the code.. JIT optimizer does completely invisible. It doesn't mind though The JIT optimizer is pretty reliable code mostly because it..
.NET String to byte Array C# http://stackoverflow.com/questions/472906/net-string-to-byte-array-c-sharp looking at the bytes . If you used a specific encoding though it would've given you trouble with encoding decoding invalid..
Protect .NET code from reverse engineering? http://stackoverflow.com/questions/506282/protect-net-code-from-reverse-engineering information on writing your own Win32 packer. Ultimately though if people want your application cracked they will. Look at all..
Use of Application.DoEvents() http://stackoverflow.com/questions/5181777/use-of-application-doevents you shouldn't use DoEvents . You should use threads. Even though they hand you a complete arsenal of ways to shoot your foot..
Accessing a Shared File (UNC) From a Remote, Non-Trusted Domain With Credentials http://stackoverflow.com/questions/659013/accessing-a-shared-file-unc-from-a-remote-non-trusted-domain-with-credentials the local computer during file access by the program. Even though it's quite possible to make this temporary it's still a hole..
Random number generator only generating one random number http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number guarantee of what happens internally is the bigger issue though since Random does not make any guarantees of thread safety...
Create Generic method constraining T to an Enum http://stackoverflow.com/questions/79126/create-generic-method-constraining-t-to-an-enum
What is the best choice for .net inter-process communication? http://stackoverflow.com/questions/84855/what-is-the-best-choice-for-net-inter-process-communication that it does not matter which one is a bit faster. WCF though has much better server throughput than .NET Remoting. If I would..
C# Finalize/Dispose pattern http://stackoverflow.com/questions/898828/c-sharp-finalize-dispose-pattern if you later suppress the finalizer. Also note that even though B doesn't have a finalizer it still calls SuppressFinalize to..
iTextSharp Creating a Footer Page # of # http://stackoverflow.com/questions/1032614/itextsharp-creating-a-footer-page-of # following the tutorial on the iText pages and the book. Though I keep getting an exception on cb.SetFontAndSize helv 12 object..
LINQ to entities - Building where clauses to test collections within a many to many relationship http://stackoverflow.com/questions/110314/linq-to-entities-building-where-clauses-to-test-collections-within-a-many-to-m were taken from these pages . I FINALLY have a solution Though there is a piece that is a bit hacked... Let's get the hacked..
Avoiding the woes of Invoke/BeginInvoke in cross-thread WinForm event handling? http://stackoverflow.com/questions/1364116/avoiding-the-woes-of-invoke-begininvoke-in-cross-thread-winform-event-handling a handle has been assigned to the control otherwise false. Though IsHandleCreated is a safe call it may breakdown if the control..
Topmost form, clicking “through” possible? http://stackoverflow.com/questions/1524035/topmost-form-clicking-through-possible CodeProject has this article detailing the technique. Though it's in VB.NET it should be easy to convert to C#. I have used.. else. The important lines here are in the OnShown method. Though I have to admit that the line wl wl 0x80000 0x20 is a little..
Resize borderless window on bottom right corner http://stackoverflow.com/questions/1535826/resize-borderless-window-on-bottom-right-corner You can put a bitmap of the standard gripper for example. Though given that your form has no title and border so you are not..
C# UserControl Constructor with Parameters http://stackoverflow.com/questions/1784303/c-sharp-usercontrol-constructor-with-parameters control twice I feel like I must be doing something wrong. Thoughts Opinions Assurance hopefully c# winforms parameters constructor.. unusual data dependencies within a single component. Though even microsoft blew this one with the SplitContainer There's..
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 of overload resolution but be an error to actually use. Though in fact that is not exactly the situation we are in here. Moving..
How to let an ASMX file output JSON http://stackoverflow.com/questions/211348/how-to-let-an-asmx-file-output-json not a GET. Scott Guthrie has a post explaining why . Though it's written specifically for jQuery this may also be useful..
Why can't C# interfaces contain fields? http://stackoverflow.com/questions/2115114/why-cant-c-sharp-interfaces-contain-fields this in the interface c# share improve this question Though many of the other answers are correct at the semantic level..
Where in memory are nullable types stored? http://stackoverflow.com/questions/2865604/where-in-memory-are-nullable-types-stored manager for example stores its temporary pool on the heap. Though of course the JScript runtime engine is not an implementation..
Why can't the C# constructor infer type? http://stackoverflow.com/questions/3570167/why-cant-the-c-sharp-constructor-infer-type why can't type inference work out that I want a MyType int Though you could get around this with a factory class public class..
Interoperating between Matlab and C# http://stackoverflow.com/questions/434331/interoperating-between-matlab-and-c-sharp share improve this question Yes quite possible. Though I ended up using the C interface and calling into that using..
Pair-wise iteration in C# or sliding window enumerator http://stackoverflow.com/questions/577590/pair-wise-iteration-in-c-sharp-or-sliding-window-enumerator do this but I'm primarily interested in C# 2.0 solutions. Though I will also appreciate C# 3.0 solutions. c# .net iterator ienumerable..
The art of programming: Java vs C# [closed] http://stackoverflow.com/questions/610199/the-art-of-programming-java-vs-c-sharp working which is where I had to delve into the C# realm. Though the .Net library is fairly extensive I can't help but feel that..
Encoding XPath Expressions with both single and double quotes http://stackoverflow.com/questions/642125/encoding-xpath-expressions-with-both-single-and-double-quotes c# xml xpath xpath 1.0 share improve this question Though it certainly won't work in all circumstances here's a way to..
Why are private fields private to the type, not the instance? http://stackoverflow.com/questions/6983553/why-are-private-fields-private-to-the-type-not-the-instance to make it easier for compiler writers to do their job. Though in this case it's easy enough to argue that private members..
.NET (C#): Getting child windows when you only have a process handle or PID? http://stackoverflow.com/questions/79111/net-c-getting-child-windows-when-you-only-have-a-process-handle-or-pid determine which hWnd in your process is the one you want. Though if you haven't used those functions before that approach will..
Event Bubbling and MVP: ASP.NET http://stackoverflow.com/questions/8851933/event-bubbling-and-mvp-asp-net do Unit Testing and does not violate MVP architecure. Note Though this is a simple example I am expecting an answer scalablt to..
WCF - Design Parameter Decision http://stackoverflow.com/questions/9553267/wcf-design-parameter-decision FundDTO fund One important point is here. Though both the services are using the same database the œIn Progress..
|