¡@

Home 

c# Programming Glossary: them

Parse JSON in C#

http://stackoverflow.com/questions/1212344/parse-json-in-c-sharp

o This are already part of Json.NET so you can just call them on the JsonConvert class. Link Serializing and Deserializing..

Encrypt/Decrypt string in .NET

http://stackoverflow.com/questions/202011/encrypt-decrypt-string-in-net

the decrypted bytes from the decrypting stream and place them in a string. plaintext srDecrypt.ReadToEnd finally Clear..

When to Use Static Classes in C#

http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp

methods static classes are useless when we need to pass them around by their interface. This renders us unable to use static.. production code with test code. Again we can wrap them up but it'll require us to change large parts of our code just.. or just add default values in languages that support them . Before long we have a method that takes 10 parameters. Only..

Randomize a List<T> in C#

http://stackoverflow.com/questions/273313/randomize-a-listt-in-c-sharp

I would like to assign a random order to in order to draw them for a lottery type application. c# generic list share improve..

Deserialize JSON into C# dynamic object?

http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object

You can drop the two methods out if you don't want them as they aren't required for deserialisation. EDIT 2 If you are..

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 GetHashCode is equal it is not necessary for them to be the same this is a collision and Equals will be called.. are testing multiple properties it is common to combine them using code like below to reduce diagonal collisions i.e. so..

Case insensitive 'Contains(string)'

http://stackoverflow.com/questions/444798/case-insensitive-containsstring

me to set the case sensitivity.. Currently I UPPERCASE them both but that's just silly. UPDATE The sillyness I refer to..

Casting vs using the 'as' keyword in the CLR

http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr

things to note There's no significant difference between them. In fact there are situations in which the as plus null check..

Protect .NET code from reverse engineering?

http://stackoverflow.com/questions/506282/protect-net-code-from-reverse-engineering

there aren't well published methods on how to unpack them. The tutorial How to write your own packer gives a ton of good.. customers and you should focus your efforts on providing them with a good user experience and ignore the people cracking your..

When to use struct in C#?

http://stackoverflow.com/questions/521298/when-to-use-struct-in-c

a collection of value types . A way to logically hold them all together into a cohesive whole. I came across these rules..

Proper use of the IDisposable interface

http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface

still save their bacon We still have a way to call it for them when the garbage collector finally gets around to freeing i.e... of from the last call to Dispose you'll try to dispose them again You'll notice in my code I was careful to remove references..

What is the best workaround for the WCF client `using` block issue?

http://stackoverflow.com/questions/573872/what-is-the-best-workaround-for-the-wcf-client-using-block-issue

block and to instead instantiate your clients and use them something like this try ... client.Close catch CommunicationException..

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

your hesitation about using exceptions but you can't avoid them all of the time protected virtual bool IsFileLocked FileInfo..

C# Finalize/Dispose pattern

http://stackoverflow.com/questions/898828/c-sharp-finalize-dispose-pattern

a hook to call your Dispose and implement a finalizer themselves if they use unmanaged resources directly public class.. within the classes you don't need to explicitly delete them. Simply calling Dispose or wrapping the class in a using .....