¡@

Home 

c# Programming Glossary: it

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

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

from C# closed How can I create an Excel Spreadsheet with C# Ideally I would like open source so I don't have to add.. best alternative for my solution. Interop will work but it requires Excel to be on the machine you are using. Also the.. but may not yield much more than what I can achieve with CSV files. I will look more into the 2003 xml format but that..

How to properly clean up Excel interop objects

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

excelSheet 0 excelSheet null GC.Collect GC.WaitForPendingFinalizers Although this kind of works the Excel.exe.. interop share improve this question Excel does not quit because your app is still holding references to COM objects... guess you're invoking at least one member of a COM object without assigning it to a variable. For me it was the excelApp.Worksheets..

Dynamic LINQ OrderBy on IEnumerable<T>

http://stackoverflow.com/questions/41244/dynamic-linq-orderby-on-ienumerablet

on IQueryable T . Is there any way to get this functionality on IEnumerable T c# linq linq to objects share improve this.. question Just stumbled into this oldie... To do this without the dynamic LINQ library you just need the code as below... most common scenarios including nested properties. To get it working with IEnumerable T you could add some wrapper methods..

Why are mutable structs evil?

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

the answer to this question . What's the actual problem with mutability and structs c# struct immutability mutable share.. to this question . What's the actual problem with mutability and structs c# struct immutability mutable share improve.. problem with mutability and structs c# struct immutability mutable share improve this question Structs are value types..

Random number generator only generating one random number

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

random new Random return random.Next min max How I call it byte mac new byte 6 for int x 0 x 6 x mac x byte Misc.RandomNumber.. int 0xFFFF int 0xFFFFFF 256 If I step that loop with the debugger during runtime I get different values which is.. share improve this question Every time you do new Random it is initialized using the clock. This means that in a tight loop..

Deep cloning objects in C#

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

in the original object. I don't often need this functionality so when it's been necessary I've resorted to creating a new.. object. I don't often need this functionality so when it's been necessary I've resorted to creating a new object and.. new object and then copying each property individually but it always leaves me with the feeling that there is a better or..

Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on

http://stackoverflow.com/questions/142003/cross-thread-operation-not-valid-control-accessed-from-a-thread-other-than-the

to square one. The Application again become nonresponsive. It seems to be due to the execution of line #1 if condition. The..

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

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

this question You can use a library called ExcelLibrary. It's a free open source library posted on Google Code ExcelLibrary.. be a port of the PHP ExcelWriter that you mentioned above. It will not write to the new .xlsx format yet but they are working.. yet but they are working on adding that functionality in. It's very simple small and easy to use. Plus it has a DataSetHelper..

How to properly clean up Excel interop objects

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

is still in the background even after I close Excel. It is only released once my application is manually closed. Anyone..

What is the difference between a field and a property in C#?

http://stackoverflow.com/questions/295104/what-is-the-difference-between-a-field-and-a-property-in-c

that use your class. public class MyClass this is a field. It is private to your class and stores the actual data. private..

Deserialize JSON into C# dynamic object?

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

a way to deserialize JSON content into a C# 4 dynamic type It would be nice to skip creating a bunch of classes in order to.. json typeof object So given a JSON string Items Name Apple Price 12.3 Name Grape Price 3.21 Date 21 11 2010.. json typeof object data.Date 21 11 2010 data.Items.Count 2 data.Items 0 .Name Apple data.Items 0 .Price 12.3..

Use of Application.DoEvents()

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

Winforms program actually contains a call to DoEvents . It is cleverly disguised however with a different name ShowDialog.. disguised however with a different name ShowDialog . It is DoEvents that allows a dialog to be modal without it freezing.. from freezing when they write their own modal loop. It certainly does that it dispatches Windows messages and gets..

Proper use of the IDisposable interface

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

The point of Dispose is to free unmanaged resources. It needs to be done at some point otherwise they will never be.. don't know the order in which two objects are destroyed. It is entirely possible that in your Dispose code the managed object.. or COM should at the very least read the first chapter. It is the best explanation of anything ever. share improve this..

What's the difference between String and string?

http://stackoverflow.com/questions/7074/whats-the-difference-between-string-and-string

for System.String . So technically there is no difference. It's like int vs. System.Int32 . As far as guidelines I think it's.. the style that Microsoft tends to use in their examples . It appears that the guidance in this area may have changed as StyleCop..

What does the [Flags] Enum Attribute mean in C#?

http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c

SuitsFlags.Diamonds .ToString Spades Diamonds It is also important to note that Flags does not automatically..

PrintPage PrintPageEventHandler Is Printing Too Many Copies

http://stackoverflow.com/questions/10287558/printpage-printpageeventhandler-is-printing-too-many-copies

c# winforms printing share improve this question I GOT IT Yippie OK if anyone cares here's the deal I needed to print..

C# Get property value without creating instance?

http://stackoverflow.com/questions/11162652/c-sharp-get-property-value-without-creating-instance

with this horrible code. THIS CODE IS FOR FUN ONLY. USING IT WILL INCUR WAILING AND GNASHING OF TEETH. using System using.. this within the property call you'd find it's null. EDIT As noted by Chris Sinclair you can do it more simply using an..

how to play sound by clicking button in asp.net? [duplicate]

http://stackoverflow.com/questions/12342519/how-to-play-sound-by-clicking-button-in-asp-net

write here is try to run on server and even if its run the IT manager will start hear clicks and not the user. You can look..

Do try/catch blocks hurt performance when exceptions are not thrown?

http://stackoverflow.com/questions/1308432/do-try-catch-blocks-hurt-performance-when-exceptions-are-not-thrown

a large section of code inside a try block. She and an IT representative suggested this can have effects on performance.. blocks affect performance when exceptions are not thrown EDIT I'm adding a bounty. There are interesting responses but I would..

Is it possible to generate complex tones in C#?

http://stackoverflow.com/questions/1643122/is-it-possible-to-generate-complex-tones-in-c

can also play certain audio files MP3 WAV AIFF MOD S3M XM IT by itself Ogg Vorbis Flac Speex with external libraries not..

C# 4.0/EF - Server-generated keys and server-generated values are not supported by SQL Server Compact

http://stackoverflow.com/questions/2734424/c-sharp-4-0-ef-server-generated-keys-and-server-generated-values-are-not-suppo

UserName newDoorAudit.UserName ID Guid.NewGuid LOOK HERE IT IS AS SUGGESTED myEntities.SaveChanges So now what Is this.. column in my database to make sure this was NOT set. A PITA for sure. Looks like a perfect little tool add in needs to..

Looking for *small*, open source, c# project with extensive Unit Testing

http://stackoverflow.com/questions/287646/looking-for-small-open-source-c-sharp-project-with-extensive-unit-testing

unit testing in my own situation in which I write mostly IT business apps used internally by my company. UPDATE Original..

Converting PDF to images using ImageMagick.NET - how to set the DPI

http://stackoverflow.com/questions/2916555/converting-pdf-to-images-using-imagemagick-net-how-to-set-the-dpi

@ E Test fileName count.ToString .jpg count The problem IT LOOKS LIKE CRAP the rendered image is hardly readable. the problem..

Can't get sql server compact 3.5 / 4 to work with ASP .NET MVC 2

http://stackoverflow.com/questions/3223359/cant-get-sql-server-compact-3-5-4-to-work-with-asp-net-mvc-2

be highly appreciated. Thank you YES I DID SEE THE KB. IT DIDN'T HELP See it here http support.microsoft.com kb 974247.. v2.0.50727 CLR Header 2.5 PE PE32 CorFlags 9 ILONLY 1 32BIT 0 Signed 1 I would have sworn I installed the x86 version of..

Wrong path returned by Environment.GetFolderPath(Environment.SpecialFolder.ApplicationFolder) under IIS6 WebService

http://stackoverflow.com/questions/3943626/wrong-path-returned-by-environment-getfolderpathenvironment-specialfolder-appli

Is everything in .NET an object?

http://stackoverflow.com/questions/436211/is-everything-in-net-an-object

sense because a an int isn't a reference to an int IT IS the int. b ints aren't garbage collected. If you declare..

RESTful WCF service image upload problem

http://stackoverflow.com/questions/664712/restful-wcf-service-image-upload-problem

file to the management system etc. This will enable the IT illiterate users that can't use file explore to submit files..

How to get a user's client IP address in ASP.NET?

http://stackoverflow.com/questions/735350/how-to-get-a-users-client-ip-address-in-asp-net

to be on the internet is in another country where our main IT facility is so from my office my IP address appears to be not..

How to create Encrypted PayNow button “on the fly” for Third-party customers, using Paypal NVP API?

http://stackoverflow.com/questions/9939960/how-to-create-encrypted-paynow-button-on-the-fly-for-third-party-customers-us

why... bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount lc IT bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount button_subtype.. img alt border 0 src https www.sandbox.paypal.com it_IT i scr pixel.gif width 1 height 1 form And here is the error.. bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount lc IT bvCount bvCount 1 NVP.Add L_BUTTONVAR bvCount button_subtype..

c# 2008 SQL Server Express Connection String

http://stackoverflow.com/questions/997169/c-sharp-2008-sql-server-express-connection-string

action view current ManagementStudio.jpg I FIGURED IT OUT When using the Data Source label one should use the User..