c# Programming Glossary: times
Public Fields versus Automatic Properties http://stackoverflow.com/questions/1180860/public-fields-versus-automatic-properties the fields to the outside world. But there are many times when a field is just there to hold a value and doesn't require..
What are the pros and cons to keeping SQL in Stored Procs versus Code http://stackoverflow.com/questions/15142/what-are-the-pros-and-cons-to-keeping-sql-in-stored-procs-versus-code want to return an extra column or whatever. The number of times you can 'transparently' change the SQL out from underneath your..
Volatile vs. Interlocked vs. lock http://stackoverflow.com/questions/154551/volatile-vs-interlocked-vs-lock If queueLength is not volatile thread A may write 5 times but thread B may see those writes as being delayed or even potentially..
Big integers in C# http://stackoverflow.com/questions/176775/big-integers-in-c-sharp large integers before this seems slow on the order of 10 times slower even for ulong length numbers. Does anyone have any better..
When to Use Static Classes in C# http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp purpose within the system. I'd much rather have a five times the classes as long as their purposes are well defined. Parameter..
Tips for optimizing C#/.NET programs [closed] http://stackoverflow.com/questions/2473666/tips-for-optimizing-c-net-programs solid engineering principles. I have been asked dozens of times over the years for my list of tips and tricks that people can..
How to fix the flickering in User controls http://stackoverflow.com/questions/2612487/how-to-fix-the-flickering-in-user-controls pixel format for that copy it renders about 10 times faster than any other pixel format. Next thing you can do is..
Performance differences between debug and release builds http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds mostly because it has been put to the test millions of times. It is extremely rare to have problems in the Release build..
Why are mutable structs evil? http://stackoverflow.com/questions/441309/why-are-mutable-structs-evil the discussions here on SO I already read several times the remark that mutable structs are evil like in the answer..
C# - The foreach identifier and closures http://stackoverflow.com/questions/512166/c-sharp-the-foreach-identifier-and-closures might very likely get confused calling the method multiple times on some instances and not at all on others. You can fix this..
When to use struct in C#? http://stackoverflow.com/questions/521298/when-to-use-struct-in-c in C# My conceptual model is that structs are used in times when the item is merely a collection of value types . A way.. still impressive to fill 300k integers while resizing 15 times during the operation. Just out of curiosity what would the total.. 13ms So now what if Entry were a class Would these times or metrics really differ that much Capacity 312874 MemSize 2660827..
How would you count occurrences of a string within a string? http://stackoverflow.com/questions/541954/how-would-you-count-occurrences-of-a-string-within-a-string source.Split 17s foreach from bobwienholt's answer 10s The times are for 50 000 000 iterations so you're unlikely to notice much..
Convert generic List/Enumerable to DataTable? http://stackoverflow.com/questions/564366/convert-generic-list-enumerable-to-datatable table Now with one line you can make this many many times faster than reflection by enabling HyperDescriptor for the object..
How to add a Timeout to Console.ReadLine()? http://stackoverflow.com/questions/57615/how-to-add-a-timeout-to-console-readline input . Function behaves badly when invoked multiple times spawning multiple threads many hanging ReadLine's or otherwise.. The function behaves properly when invoked multiple times. Regardless of whether a timeout occurs or not only one background..
C#, int or Int32? Should I care? http://stackoverflow.com/questions/62503/c-int-or-int32-should-i-care Int32 are the same thing in C# but I've read a number of times that int is preferred over Int32 but without any reason given...
Sending email through Gmail SMTP server with C# http://stackoverflow.com/questions/704636/sending-email-through-gmail-smtp-server-with-c-sharp and the accepted answer has been code I've used many many times on different projects. I've taken some of the ideas in this..
Random number generator only generating one random number http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number means that in a tight loop you get the same value lots of times. You should keep a single Random instance and keep using Next..
ExecuteReader requires an open and available Connection. The connection's current state is Connecting http://stackoverflow.com/questions/9705637/executereader-requires-an-open-and-available-connection-the-connections-curren pooling. Connection pooling reduces the number of times that new connections must be opened. The pooler maintains ownership..
How to add attributes for C# XML Serialization http://stackoverflow.com/questions/1012360/how-to-add-attributes-for-c-sharp-xml-serialization required output Root Method Retrieve Method Options Filter Times TimeFrom 2009 06 17 TimeFrom Times Document type word document.. Method Options Filter Times TimeFrom 2009 06 17 TimeFrom Times Document type word document name Document Filter Options AdCourierAPI.. public _Filter Filter public class _Filter XmlElement Times public _Times Times XmlElement Documents public string Documents..
Need help to understand Moq better http://stackoverflow.com/questions/1073846/need-help-to-understand-moq-better what it is trying to show. Next I don't get when to use Times and its AtMost methods and similar . Why would you limit the.. the add method didn't have the age property set to 12. Times If you had a method along the lines of public void PayPensionContribution.. p mockPensionService.Verify ps ps.Pay It.IsAny decimal Times.Never Similarly it's possible to imagine situations where you're..
Card Shuffling in C# http://stackoverflow.com/questions/1150646/card-shuffling-in-c-sharp Console.WriteLine c Console.WriteLine How Many Times Do You Want To Shuffle Deck.cs namespace ConsoleApplication1..
How to Avoid Firing ObservableCollection.CollectionChanged Multiple Times When Replacing All Elements Or Adding a Collection of Elements http://stackoverflow.com/questions/13302933/how-to-avoid-firing-observablecollection-collectionchanged-multiple-times-when-r Firing ObservableCollection.CollectionChanged Multiple Times When Replacing All Elements Or Adding a Collection of Elements..
How to output unicode string to RTF (using C#) http://stackoverflow.com/questions/1368020/how-to-output-unicode-string-to-rtf-using-c @ c helloworld.rtf sw.WriteLine @ rtf fonttbl f0 Times New Roman f0 fs60 H GetRtfUnicodeEscapedString new String ca..
What's the equivalent of Java's enum in C#? [duplicate] http://stackoverflow.com/questions/1376312/whats-the-equivalent-of-javas-enum-in-c GenericOperator x y x y public static readonly Operator Times new GenericOperator x y x y public static readonly Operator..
Parsing Performance (If, TryParse, Try-Catch) http://stackoverflow.com/questions/150114/parsing-performance-if-tryparse-try-catch to go with good advice here is the timing data requested Times for various failure rates on 10 000 inputs from the user for..
Verifying a method was called http://stackoverflow.com/questions/1980108/verifying-a-method-was-called World string result mock.Object.Say mock.Verify x x.Hello Times.Exactly 1 Assert.AreEqual Hello World result Which fails with.. IProxyCall expected Expression expression Times times ... If I make the Hello method public like this the test..
Export to Word Document in C# http://stackoverflow.com/questions/282531/export-to-word-document-in-c-sharp font family Arial p.Address text align center font family Times margin bottom 10px style head body p class Address The Street..
Very Different Execution Times of SQL Query in C# and SQL Server Management Studio http://stackoverflow.com/questions/3070653/very-different-execution-times-of-sql-query-in-c-sharp-and-sql-server-management Different Execution Times of SQL Query in C# and SQL Server Management Studio I have..
C# - How to use a custom Font without installing it in the system http://stackoverflow.com/questions/4411067/c-sharp-how-to-use-a-custom-font-without-installing-it-in-the-system If the font is not present in the system it just uses Times New Roman. Is there any way to embed the font file in the application..
What is it that makes Enum.HasFlag so slow? http://stackoverflow.com/questions/7368652/what-is-it-that-makes-enum-hasflag-so-slow class SpeedTest public int Iterations get set public int Times get set public List Stopwatch Watches get set public Action.. s s.ElapsedMilliseconds public SpeedTest Action func Times 10 Iterations 100000 Function func Watches new List Stopwatch.. Stopwatch public void Test Watches.Clear for int i 0 i Times i var sw Stopwatch.StartNew for int o 0 o Iterations o ..
|