¡@

Home 

c# Programming Glossary: use

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

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

c# .net excel share improve this question You can use a library called ExcelLibrary. It's a free open source library.. that functionality in. It's very simple small and easy to use. Plus it has a DataSetHelper that lets you use DataSets and.. and easy to use. Plus it has a DataSetHelper that lets you use DataSets and DataTables to easily work with Excel data. ExcelLibrary..

How to properly clean up Excel interop objects

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

and have placed the following code in my finally clause while System.Runtime.InteropServices.Marshal.ReleaseComObject.. share improve this question Excel does not quit because your app is still holding references to COM objects. I guess.. me it was the excelApp.Worksheets object which I directly used without assigning it to a variable Worksheet sheet excelApp.Worksheets.Open..

Sending email in .NET through Gmail

http://stackoverflow.com/questions/32260/sending-email-in-net-through-gmail

.net email gmail share improve this question Be sure to use System.Net.Mail not the deprecated System.Web.Mail . Doing SSL..

Dynamic LINQ OrderBy on IEnumerable<T>

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

in the VS2008 Examples for Dynamic LINQ that allows you to use a sql like string e.g. OrderBy Name Age DESC for ordering. Unfortunately.. type x Expression expr arg foreach string prop in props use reflection not ComponentModel to mirror LINQ PropertyInfo pi..

What's the difference between String and string?

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

String S Hello World Also what are the guidelines for the use of each c# string share improve this question string is.. As far as guidelines I think it's generally recommended to use string any time you're referring to an object. e.g. string place.. place world Likewise I think it's generally recommended to use String if you need to refer specifically to the class. e.g...

Random number generator only generating one random number

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

we don't access it at the same time from different threads use different Random instances per thread either can be fine but..

Deep cloning objects in C#

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

a deep copy of an object. Binary Serialization is used to perform the copy. summary public static class ObjectCopier.. everything when an object gets too complex. And with the use of extension methods also from the originally referenced source.. the originally referenced source In case you prefer to use the new extension methods of C# 3.0 change the method to have..

How to use HTML Agility pack

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

to use HTML Agility pack How do I use the HTML Agility Pack My XHTML.. to use HTML Agility pack How do I use the HTML Agility Pack My XHTML document is not completely valid... document is not completely valid. That's why I wanted to use it. How do I use it in my project My project is in C#. c# html..

Dependency Inject (DI) “friendly” library

http://stackoverflow.com/questions/2045904/dependency-inject-di-friendly-library

Ask for it implicitly by using Constructor Injection . Use Constructor Injection When you need a dependency ask for it.. combination of the Guard Clause and the readonly keyword. Use Abstract Factory if you need a short lived object Dependencies..

When to Use Static Classes in C#

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

to Use Static Classes in C# Here's what MSDN has to say under When.. Classes in C# Here's what MSDN has to say under When to Use Static Classes static class CompanyInfo public static string.. static string GetCompanyAddress return CompanyAddress ... Use a static class as a unit of organization for methods not associated..

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

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

instead. See link at the bottom for caveats on this. Use string.Compare to compare 2 strings instead of doing something..

How to force my .NET App to run as administrator on Windows 7?

http://stackoverflow.com/questions/2818179/how-to-force-my-net-app-to-run-as-administrator-on-windows-7

The user gets the UAC prompt when they start the program. Use wisely their patience can wear out quickly. share improve this..

Best practice to save application settings in a Windows Forms Application

http://stackoverflow.com/questions/453161/best-practice-to-save-application-settings-in-a-windows-forms-application

tab click on the hyperlink if settings doesn't exist. Use the Settings tab to create application settings. Visual Studio..

How do I make a textbox that only accepts numbers?

http://stackoverflow.com/questions/463299/how-do-i-make-a-textbox-that-only-accepts-numbers

textbox share improve this question Two options Use a NumericUpDown instead. NumericUpDown does the filtering for..

VS2010 does not show unhandled exception message in a WinForms Application on a 64-bit version of Windows

http://stackoverflow.com/questions/4933958/vs2010-does-not-show-unhandled-exception-message-in-a-winforms-application-on-a

CLR exceptions. Write try catch in the Load event handler. Use Application.SetUnhandledExceptionMode UnhandledExceptionMode.CatchException..

Casting vs using the 'as' keyword in the CLR

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

int value if int.TryParse text value value int.Parse text Use value That's sort of what is and cast is doing although obviously..

Protect .NET code from reverse engineering?

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

has a free edition and comes with Visual Studio. Use public private key or asymmetric encryption to generate your.. it is impossible to reverse the key generating algorithm. Use a third party packer to pack your .NET executable into an encrypted..

Use of Application.DoEvents()

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

of Application.DoEvents Can Application.DoEvents be used in..

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

on IServiceOriented . You start with public delegate void UseServiceDelegate T T proxy public static class Service T public.. T _channelFactory new ChannelFactory T public static void Use UseServiceDelegate T codeBlock IClientChannel proxy IClientChannel.. new ChannelFactory T public static void Use UseServiceDelegate T codeBlock IClientChannel proxy IClientChannel..

C# DLL config file

http://stackoverflow.com/questions/594298/c-sharp-dll-config-file

by examining the App Domain of the referencing assembly. Use this to create some sort of folder structure for keeping separate..

How do I convert Word files to PDF programmatically?

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

word Open method Object filename Object wordFile.FullName Use the dummy value as a placeholder for optional arguments Document..

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

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

quoting from msdn Flags public enum MyColors None 0 .... Use None as the name of the flag enumerated constant whose value..

How to use HTML Agility pack

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

a path to a file containing the html htmlDoc.Load filePath Use htmlDoc.LoadHtml xmlString to load from a string was htmlDoc.LoadXML..

XML Serialization and Inherited Types

http://stackoverflow.com/questions/20084/xml-serialization-and-inherited-types

Data get return _data set _data value summary DO NOT USE This is only added to enable XML Serialization. summary remarks.. added to enable XML Serialization. summary remarks DO NOT USE THIS CONSTRUCTOR remarks public AbstractXmlSerializer Default.. Default Ctor Required for Xml Serialization DO NOT USE summary Initialises the Serializer to work with the given data...

How to pre-load all deployed assemblies for an AppDomain

http://stackoverflow.com/questions/3021613/how-to-pre-load-all-deployed-assemblies-for-an-appdomain

a assembly.GetName crucial USE THE ASSEMBLY NAME. in a web app this assembly will automatically..

multimap in .NET

http://stackoverflow.com/questions/380595/multimap-in-net

TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND.. OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY.. NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH..

Exclusive access could not be obtained because the database is in use

http://stackoverflow.com/questions/4046708/exclusive-access-could-not-be-obtained-because-the-database-is-in-use

string DatabaseFullPath string backUpPath string sRestore USE master RESTORE DATABASE DatabaseFullPath FROM DISK N' backUpPath..

Does Entity Framework 4 Code First have support for identity generators like NHibernate?

http://stackoverflow.com/questions/5275306/does-entity-framework-4-code-first-have-support-for-identity-generators-like-nhi

public class Context DbContext Helper for example DO NOT USE IN REAL SCENARIOS private static int i 0 public DbSet MyEntity..

Accessing a Shared File (UNC) From a Remote, Non-Trusted Domain With Credentials

http://stackoverflow.com/questions/659013/accessing-a-shared-file-unc-from-a-remote-non-trusted-domain-with-credentials

at that time. This is typically done using the NET USE command or the Win32 functions that duplicate NET USE . Access.. NET USE command or the Win32 functions that duplicate NET USE . Access the file with a UNC path as if the remote computer..