¡@

Home 

c# Programming Glossary: why

Parse JSON in C#

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

share improve this question Update I've just realized why you weren't receiving results back... you have a missing line..

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

trying to build a maintainable application Agreed which is why storedprocs are a bad thing. It's much easier to refactor and.. a million tiers if you're trying to justify to your CEO why it just cost them 7 million dollars to build some forums but..

How to properly clean up Excel interop objects

http://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects

by my code because I wasn't aware of it and was the cause why Excel was not unloaded. I found the solution to my problem on..

When to Use Static Classes in C#

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

classes for no reason One of the most common arguments is why demand that consumers of our class create an instance for invoking..

Why is lock(this) {…} bad?

http://stackoverflow.com/questions/251391/why-is-lockthis-bad

if the instance can be accessed publicly . I'm wondering why Is it because the lock will be held longer than necessary Or.. lock cannot be made otherwise the lock is allowed. This is why it's bad to use strings as the keys in lock statements since..

What C# mocking framework to use? [closed]

http://stackoverflow.com/questions/37359/what-c-sharp-mocking-framework-to-use

is what one is your favourite .NET mocking framework and why c# .net unit testing mocking share improve this question..

.NET String to byte Array C#

http://stackoverflow.com/questions/472906/net-string-to-byte-array-c-sharp

to a byte array in .NET C# Update Also please explain why encoding should be taken into consideration. Can't I simply.. the bytes. For those goals I honestly do not understand why people keep telling you that you need the encodings. You certainly..

Use of Application.DoEvents()

http://stackoverflow.com/questions/5181777/use-of-application-doevents

of backlash against it but nobody ever really explains why it is bad . The same kind of wisdom as don't mutate a struct.. . The same kind of wisdom as don't mutate a struct . Erm why does the runtime and the language supports mutating a struct.. ever actually likes doing this. And doesn't. Which is why you shouldn't use DoEvents . You should use threads. Even though..

When to use struct in C#?

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

boxing a struct rethink your architecture. Let's look at why Microsoft would use these structs Each struct Entry and Enumerator..

Proper use of the IDisposable interface

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

Dispose meaning they no longer plan to use the object why not get rid of those wasteful bitmaps and database connections.. anyone who likes the style of this answer explaining the why so the how becomes obvious I suggest you read Chapter One of.. and invents COM before your eyes. Once you realize the why of COM the remaining 300 pages are obvious and just detail Microsoft's..

Random number generator only generating one random number

http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number

synchronize return random.Next min max Edit see comments why do we need a lock here Basically Next is going to change the..

How to use HTML Agility pack

http://stackoverflow.com/questions/846994/how-to-use-html-agility-pack

Pack My XHTML document is not completely valid. That's why I wanted to use it. How do I use it in my project My project..

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

on the Connection Pool's territory There's a good reason why ADO.NET internally manages the underlying Connections to the.. encapsulates and reuse all objects. That's the reason why i commented to trash it. That's only a problem source. Edit..

Virtual member call in a constructor

http://stackoverflow.com/questions/119506/virtual-member-call-in-a-constructor

a call to a virtual member from my objects constructor. Why would this be something not to do c# constructor warnings resharper..

How to check for file lock?

http://stackoverflow.com/questions/1304/how-to-check-for-file-lock

become locked the very next second read short timespan . Why specifically do you need to know if the file is locked anyway..

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

desktop apps clickonce might help on all the windows boxes Why are your windows apps connecting directly to a central database..

TransactionScope automatically escalating to MSDTC on some machines?

http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines

SqlConnection.Open is grabbing from the connection pool. Why might this happen though Well if you use a SqlTableAdapter against..

Why .NET String is immutable? [duplicate]

http://stackoverflow.com/questions/2365272/why-net-string-is-immutable

.NET String is immutable duplicate This question already has.. duplicate This question already has an answer here Why can't strings be mutable in Java and .NET 16 answers ..

What are the correct version numbers for C#?

http://stackoverflow.com/questions/247621/what-are-the-correct-version-numbers-for-c

are the correct version numbers for C# What came out when Why can't I find any answers about C# 3.5 This question is primarily..

Why is lock(this) {…} bad?

http://stackoverflow.com/questions/251391/why-is-lockthis-bad

is lock this &hellip bad The MSDN documentation says that public..

Why does one often see “null != variable” instead of “variable != null” in C#?

http://stackoverflow.com/questions/271561/why-does-one-often-see-null-variable-instead-of-variable-null-in-c

does one often see &ldquo null variable&rdquo instead of &ldquo..

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

is it important to override GetHashCode when Equals method is.. is the preferred method for overriding the GetHashCode Why is it important to override GetHashCode c# override hashcode..

C# - List<T> or IList<T>

http://stackoverflow.com/questions/400135/c-sharp-listt-or-ilistt

I would want to use IList over List in C# Related question Why is it considered bad to expose List T c# generics list ilist..

Why are mutable structs evil?

http://stackoverflow.com/questions/441309/why-are-mutable-structs-evil

are mutable structs evil Following the discussions here on..

.NET String to byte Array C#

http://stackoverflow.com/questions/472906/net-string-to-byte-array-c-sharp

I simply get what bytes the string has been stored in Why this dependency on encoding c# .net string bytearray share..

Proper use of the IDisposable interface

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

taken care of. To answer your original question Why not release memory now rather than for when the GC decides to..

Sending email through Gmail SMTP server with C#

http://stackoverflow.com/questions/704636/sending-email-through-gmail-smtp-server-with-c-sharp

work for me for Sending email in .NET through Gmail . Why would it not work UPDATE I have tried all the answers accepted..

Why is floating point arithmetic in C# imprecise?

http://stackoverflow.com/questions/753948/why-is-floating-point-arithmetic-in-c-sharp-imprecise

is floating point arithmetic in C# imprecise Why does the following.. is floating point arithmetic in C# imprecise Why does the following program print what it prints class Program..

Random number generator only generating one random number

http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number

that code all members of the mac array have equal value. Why does that happen c# random share improve this question Every..

Nullable types and the ternary operator: why is `? 10 : null` forbidden? [duplicate]

http://stackoverflow.com/questions/858080/nullable-types-and-the-ternary-operator-why-is-10-null-forbidden

assignment with Nullable value types 4 answers Why doesn't this C# code compile 4 answers I just came across..

How to tell if an IEnumerable<T> is subject to deferred execution ?

http://stackoverflow.com/questions/1168944/how-to-tell-if-an-ienumerablet-is-subject-to-deferred-execution

immediately created and remain static. I'm not quite sure WHY I assumed this and its a very bad assumption but I did. I often..

Using the instance version of CreateMap and Map with a WCF service?

http://stackoverflow.com/questions/1668962/using-the-instance-version-of-createmap-and-map-with-a-wcf-service

FOUND OUT WHERE IS FAILING BUT UNKNOWN WHY See my comments inline with code. In the constructor the urlTemplate..

What do I need to do to implement an “out of proc” COM server in C#?

http://stackoverflow.com/questions/30653/what-do-i-need-to-do-to-implement-an-out-of-proc-com-server-in-c

I cannot load the .NET runtime into my main process space WHY My C code is in a DLL that is loaded into many different customer..

Delegates, Why? [duplicate]

http://stackoverflow.com/questions/3567478/delegates-why

the use of delegates. I am still not clear where and WHY would you use delegates instead of calling the method directly...

smart way to generate unique random number

http://stackoverflow.com/questions/3627029/smart-way-to-generate-unique-random-number

Is there a smarter way EDIT as allways i forgot to say WHY i wanted this and it will probably make things clearer and maybe..

Garbage collection when using anonymous delegates for event handling

http://stackoverflow.com/questions/371109/garbage-collection-when-using-anonymous-delegates-for-event-handling

code all over the shop. Oh and don't bother with asking me WHY we are creating and destroying controls all the time it wasn't..

There is a Default instance of form in VB.Net but not in C#, WHY?

http://stackoverflow.com/questions/4698538/there-is-a-default-instance-of-form-in-vb-net-but-not-in-c-why

is a Default instance of form in VB.Net but not in C# WHY I'm just curious to know that there is The Name property which..

Is C# really slower than say C++?

http://stackoverflow.com/questions/5326269/is-c-sharp-really-slower-than-say-c

in C# will be slower than the same code in C In if so then WHY Some other reference Which talk about that a bit but with no.. Which talk about that a bit but with no explanation about WHY Why would you want to use C# if its slower than C c# c performance..

Options for using System.Data.SQLite in a 32bit and 64bit C# world

http://stackoverflow.com/questions/7264383/options-for-using-system-data-sqlite-in-a-32bit-and-64bit-c-sharp-world

in a 32bit and 64bit C# world I understand WHY the System.Data.SQLite.dll is provided in 32 bit and 64 bit..