¡@

Home 

c# Programming Glossary: using

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

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

party dependencies to my code and I would like to avoid using Excel directly to create the file using OLE Automation. The.. like to avoid using Excel directly to create the file using OLE Automation. The .CSV file solution is easy and is the current.. work but it requires Excel to be on the machine you are using. Also the OLEDB method is intriguing but may not yield much..

How to properly clean up Excel interop objects

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

to properly clean up Excel interop objects I'm using the Excel interop in C# ApplicationClass and have placed the..

Encrypt/Decrypt string in .NET

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

o6806642kbM7c5 summary Encrypt the given string using AES. The string can be decrypted using DecryptStringAES . The.. the given string using AES. The string can be decrypted using DecryptStringAES . The sharedSecret parameters must match. summary.. aesAlg.IV Create the streams used for encryption. using MemoryStream msEncrypt new MemoryStream prepend the IV msEncrypt.Write..

Random number generator only generating one random number

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

question Every time you do new Random it is initialized using the clock. This means that in a tight loop you get the same.. times. You should keep a single Random instance and keep using Next on the same instance. Function to get random number private..

Deep cloning objects in C#

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

elsewhere it does require your objects to be serializable. using System using System.IO using System.Runtime.Serialization using.. does require your objects to be serializable. using System using System.IO using System.Runtime.Serialization using System.Runtime.Serialization.Formatters.Binary.. objects to be serializable. using System using System.IO using System.Runtime.Serialization using System.Runtime.Serialization.Formatters.Binary..

Volatile vs. Interlocked vs. lock

http://stackoverflow.com/questions/154551/volatile-vs-interlocked-vs-lock

from executing any other code which is guarded by locker . Using locks also prevents the multi cpu reordering problems as above..

Transitioning from Windows Forms to WPF

http://stackoverflow.com/questions/15681352/transitioning-from-windows-forms-to-wpf

to learn how to use WPF in the way it's meant to be used. Using WPF like it's WinForms means you miss out on much of what makes..

Simple 2 way encryption for C#

http://stackoverflow.com/questions/165808/simple-2-way-encryption-for-c-sharp

value in the Vector array to make sure you do this... . Using it is easy just instantiate the class and then call usually..

Using CookieContainer with WebClient class

http://stackoverflow.com/questions/1777221/using-cookiecontainer-with-webclient-class

CookieContainer with WebClient class I've previously used a..

What is the correct way to create a single instance application?

http://stackoverflow.com/questions/19147/what-is-the-correct-way-to-create-a-single-instance-application

the correct way to create a single instance application Using C# and WPF under .net rather than WindowsForms or console what..

What is the C# Using block and why should I use it?

http://stackoverflow.com/questions/212198/what-is-the-c-sharp-using-block-and-why-should-i-use-it

is the C# Using block and why should I use it What is the purpose of the Using.. block and why should I use it What is the purpose of the Using block in C# How is it different from a local variable c# .net..

Conditional operator cannot cast implicitly?

http://stackoverflow.com/questions/2215745/conditional-operator-cannot-cast-implicitly

aBoolValue byte 1 byte 0 What's going on here EDIT Using VS2008 C# 3.5 c# types conditional operator implicit cast ..

Creating application shortcut in a directory

http://stackoverflow.com/questions/234231/creating-application-shortcut-in-a-directory

This code uses interop but does not rely on WSH. Using this class the code to create the shortcut is private static..

When to Use Static Classes in C#

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

speed does however. Standards standards standards Using instance methods does not inhibit you from also using static..

Windows service and timer

http://stackoverflow.com/questions/246697/windows-service-and-timer

which are respectively for ASP applications and WinForms. Using those will cause the service to load an additional assembly..

Why is lock(this) {…} bad?

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

to it and it will encapsulate the locking mechanism. Using this violates encapsulation by exposing part of your locking..

Using AES encryption in C#

http://stackoverflow.com/questions/273452/using-aes-encryption-in-c-sharp

AES encryption in C# I can't seem to find a nice clean example..

Repository pattern tutorial in C# [closed]

http://stackoverflow.com/questions/3175/repository-pattern-tutorial-in-c-sharp

Driven Design and Patterns by Jimmy Nilsson My blog post Using the unit of work per request pattern in ASP.NET MVC also details..

LINQ to SQL: Return anonymous type?

http://stackoverflow.com/questions/534690/linq-to-sql-return-anonymous-type

to SQL Return anonymous type Using the simple example below what is the best way to return results..

Using .NET, how can you find the mime type of a file based on the file signature not the extension

http://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature

.NET how can you find the mime type of a file based on the file..

C# Events and Thread Safety

http://stackoverflow.com/questions/786383/c-sharp-events-and-thread-safety

are immutable. As far as I can see this is unavoidable. Using an empty delegate certainly avoids the nullity check but doesn't..

Using C# regular expressions to remove HTML tags [duplicate]

http://stackoverflow.com/questions/787932/using-c-sharp-regular-expressions-to-remove-html-tags

C# regular expressions to remove HTML tags duplicate This question..

Using C#, how does one figure out what process locked a file?

http://stackoverflow.com/questions/860656/using-c-how-does-one-figure-out-what-process-locked-a-file

C# how does one figure out what process locked a file In Windows..

C# Login to Website via program

http://stackoverflow.com/questions/930807/c-sharp-login-to-website-via-program

your post data as follows field1 value1 field2 value2 Using WebRequest and code I adapted from Scott Hanselman here's how..

Most efficient way to find all exe files on disk using C#?

http://stackoverflow.com/questions/10965280/most-efficient-way-to-find-all-exe-files-on-disk-using-c

SELECT ContentPath Days Old FileName Creation Date Time USING creationtime AS Creation Date Time TO_DATE Creation Date Time.. SELECT ContentPath Days Old FileName Creation Date Time USING creationtime AS Creation Date Time TO_DATE Creation Date Time..

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..

Embedded Web Server in .NET

http://stackoverflow.com/questions/155161/embedded-web-server-in-net

Here are some links to get you started. XML RPC SERVER USING HTTPLISTENER HttpListener For Dummies As for the PHP support..

How to Syntax Highlight in a RichTextBox [C#]?

http://stackoverflow.com/questions/1697360/how-to-syntax-highlight-in-a-richtextbox-c

highlight in a richtextbox control AS THE USER TYPES and USING A String keywords . I will be publishing a lightweight notepad..

How to make an installer for my C# application?

http://stackoverflow.com/questions/2251062/how-to-make-an-installer-for-my-c-sharp-application

C# USING keyword - when and when not to use it?

http://stackoverflow.com/questions/317184/c-sharp-using-keyword-when-and-when-not-to-use-it

USING keyword when and when not to use it I'd like to know when i.. know when i should and shouldn't be wrapping things in a USING block. From what I understand the compiler translates it into.. the finally calls Dispose on the object. I always use a USING around database connections and file access but its more out..