¡@

Home 

c# Programming Glossary: surprises

C# Object Pooling Pattern implementation

http://stackoverflow.com/questions/2510975/c-sharp-object-pooling-pattern-implementation

loadingMode LoadingMode.Eager PreloadItems Should be no surprises here. Only thing to note is the special casing for eager loading..

How do I keep aspect ratio on scalable, scrollable content in WPF?

http://stackoverflow.com/questions/288954/how-do-i-keep-aspect-ratio-on-scalable-scrollable-content-in-wpf

aspect ratio. This actually seems quite tricky to do which surprises me because I would imagine its a reasonably common requirement...

Overriding vs method hiding [duplicate]

http://stackoverflow.com/questions/3838553/overriding-vs-method-hiding

second case is that we've used hiding precisely to remove surprises to the calling code as the person using DerivedClass might reasonably.. with each other. Most cases of hiding risk introducing surprises which is why they are generally frowned upon. This one is justified..

Why is Enumerable.Range faster than a direct yield loop?

http://stackoverflow.com/questions/408452/why-is-enumerable-range-faster-than-a-direct-yield-loop

takes more method invocations. However it really surprises me that Enumerable.Range is faster than the self made IEnumerable..

Can a background image be set on a Winforms TextBox?

http://stackoverflow.com/questions/4360301/can-a-background-image-be-set-on-a-winforms-textbox

and draw the image you'll be in for several rude surprises. Falling back to legacy rendering mode is just one of them...

Different ways of passing sqlCommand parameters

http://stackoverflow.com/questions/4624811/different-ways-of-passing-sqlcommand-parameters

expects you might see conversion and other unpleasant surprises. So if you define a string define it's length too So in your..

Overriding GetHashCode for mutable objects? [C#]

http://stackoverflow.com/questions/873654/overriding-gethashcode-for-mutable-objects-c

I want plain old reference equality default behavior no surprises. For very rare cases I want to have value equality and I want..

Restricting a generic type parameters to have a specific constructor

http://stackoverflow.com/questions/9741211/restricting-a-generic-type-parameters-to-have-a-specific-constructor

behaviors. but I really must disagree. In C# well in .NET surprises like Hot to make a penguin fly simply don't happen. There are..