¡@

Home 

c# Programming Glossary: that

Create Excel (.XLS and .XLSX) file from C# [closed]

http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp

CSV files. I will look more into the 2003 xml format but that also puts a Excel 2003 requirement on the file. I am currently.. looking at a port of the PEAR PHP library Excel Writer that will allow some pretty good XLS data and formatting and it is.. and formatting and it is in the Excel_97 compatible format that all modern versions of Excel support. The PEAR Excel Writer..

How to properly clean up Excel interop objects

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

... Marshal.ReleaseComObject sheet What I didn't know was that internally C# created a wrapper for the Worksheets COM object..

Why are mutable structs evil?

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

here on SO I already read several times the remark that mutable structs are evil like in the answer to this question.. around. So if you change a copy you are changing only that copy not the original and not any other copies which might be..

Random number generator only generating one random number

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

Misc.RandomNumber int 0xFFFF int 0xFFFFFF 256 If I step that loop with the debugger during runtime I get different values.. I want . However if I put a breakpoint two lines below that code all members of the mac array have equal value. Why does.. all members of the mac array have equal value. Why does that happen c# random share improve this question Every time..

Deep cloning objects in C#

http://stackoverflow.com/questions/78536/deep-cloning-objects-in-c-sharp

newObj myObj.Clone And then make changes to the new object that are not reflected in the original object. I don't often need.. individually but it always leaves me with the feeling that there is a better or more elegant way of handling the situation... the situation. How can I clone or deep copy an object so that the cloned object can be modified without any changes being..

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

windows apps connecting directly to a central database That seems like a HUGE security hole right there and bottleneck as..

TransactionScope automatically escalating to MSDTC on some machines?

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

us library ms229978.aspx MSDN on transaction escalation. That MSDN transaction escalation page states that the following conditions.. Dev 3 actually has SQL2008 and Dev 4 is actually SQL2005. That'll teach me to never trust my coworkers again. Because of this..

Which .NET Dependency Injection frameworks are worth looking into? [closed]

http://stackoverflow.com/questions/21288/which-net-dependency-injection-frameworks-are-worth-looking-into

they provide a host of other benefits over and above DI. That being said I'm sure that's what you were asking about IoC Frameworks..

How is Generic Covariance & Contra-variance Implemented in C# 4.0?

http://stackoverflow.com/questions/245607/how-is-generic-covariance-contra-variance-implemented-in-c-sharp-4-0

to support Generic covariance and contra variance. That is List string can be assigned to List object . How could that.. you take values out of it it doesn't let you add new ones. That will become IEnumerable out T . That doesn't hurt type safety.. let you add new ones. That will become IEnumerable out T . That doesn't hurt type safety at all but lets you return an IEnumerable..

Tips for optimizing C#/.NET programs [closed]

http://stackoverflow.com/questions/2473666/tips-for-optimizing-c-net-programs

their instrument to the tasks it is designed to perform. That performance analysis is a lost art is a very very good thing... analysis is a lost art is a very very good thing. That art was practiced as an art . Optimization should be approached.. tricks is exactly the wrong way to approach performance. That way leads to code which is hard to understand hard to reason..

Returning IEnumerable<T> vs IQueryable<T>

http://stackoverflow.com/questions/2876616/returning-ienumerablet-vs-iqueryablet

... Later on... var goldCustomers custs.Where c c.IsGold That code will execute SQL to only select gold customers. The following..

Call ASP.NET Function From Javascript?

http://stackoverflow.com/questions/3713/call-asp-net-function-from-javascript

Javascript. Now you can call any other event you like. P.S That is 'underscore underscore doPostBack' ... And there should be..

Performance differences between debug and release builds

http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds

build of your app and compare it to the Release build. That only really matters though when the code is on your critical..

Casting vs using the 'as' keyword in the CLR

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

means there's a bug then casting is the right solution. That throws an exception immediately which means that no more work.. due to another thread between the test and the cast. That would be a pretty rare situation but I'd rather have a convention.. if int.TryParse text value value int.Parse text Use value That's sort of what is and cast is doing although obviously in a..

Use of Application.DoEvents()

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

main window while the loop that calls DoEvents is running. That works user interface is gone. But your code didn't stop it is.. But your code didn't stop it is still executing the loop. That's bad. Very very bad. There's more the user could click the.. is suspended and the new loop is starting from scratch. That could work but boy the odds are slim. Especially when the nested..

Creating a blocking Queue<T> in .NET?

http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net

collections queue share improve this question That looks very unsafe very little synchronization how about something..

Proper use of the IDisposable interface

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

The GC doesn't know or care about your Dispose method. That was just a name we chose for a method we call when we want to..

How do I convert Word files to PDF programmatically?

http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically

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

to be faster than to create a new object for any action. That is neither a good idea in terms of peformance nor in terms of.. to dispose and close in case of Connections implicitely That's true not only for Connections although most noticable . Every.. custom DB Class which encapsulates and reuse all objects. That's the reason why i commented to trash it. That's only a problem..