¡@

Home 

c# Programming Glossary: create

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

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

Excel .XLS and .XLSX file from C# closed How can I create an Excel Spreadsheet with C# Ideally I would like open source.. my code and I would like to avoid using Excel directly to create the file using OLE Automation. The .CSV file solution is easy.. the Excel file is as easy as that. You can also manually create Excel files but the above functionality is what really impressed..

Simple 2 way encryption for C#

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

Convert a string to a byte array. NOTE Normally we'd create a Byte Array from a string using an ASCII encoding like so ...

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

is the correct way to create a single instance application Using C# and WPF under .net rather.. than WindowsForms or console what is the correct way to create an application that can only be run as a single instance I know..

Dependency Inject (DI) “friendly” library

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

possible reducing the amount of work a user has to do to create all these unimportant dependencies just to get to the real classes.. class guarantees its invariants. Once an instance is created the dependency is guaranteed to be available because of the.. return new Foo this.dep This would allow a user to create a default Foo by writing var foo new MyFacade .CreateFoo It..

When to Use Static Classes in C#

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

simpler and faster because you do not have to create an object in order to call its methods. It is useful to organize.. functionality either before or after the old method we can create a new class and call the old one inside of it but that's just.. Soon further parameters are added that are optional so we create overloads of the method or just add default values in languages..

C# Captured Variable In Loop

http://stackoverflow.com/questions/271440/c-sharp-captured-variable-in-loop

copy 2 variable You can think of it as if the C# compiler creates a new local variable every time it hits the variable declaration... every time it hits the variable declaration. In fact it'll create appropriate new closure objects and it gets complicated in terms..

Validate a username and password against Active Directory?

http://stackoverflow.com/questions/290548/validate-a-username-and-password-against-active-directory

namespace and easily verify your credentials create a principal context e.g. your domain could be machine too using..

WebBrowser Control in a new thread

http://stackoverflow.com/questions/4269800/webbrowser-control-in-a-new-thread

Uri's that I want clicked To achieve this I m trying to create a new web browser control per Uri. I create a new thread per.. I m trying to create a new web browser control per Uri. I create a new thread per Uri. The problem I'm having is the thread end.. web browser share improve this question You have to create an STA thread that pumps a message loop. That's the only hospitable..

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

Application on a 64 bit version of Windows When I create a new project I get a strange behaviour for unhandeled exceptions... exceptions. This is how I can reproduce the problem 1 create a new Windows Forms Application C# .NET Framework 4 VS2010 2.. existing C# projects. So I guess that my new projects are created with some strange default settings. Does anyone have an idea..

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

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

Excel .XLS and .XLSX file from C# closed How can I create an.. the ExcelLibrary code is the single line at the bottom Create the data set and table DataSet ds new DataSet New_DataSet DataTable.. con new OleDbConnection dbConnectionString con.Open Create a query and fill the data table with the data from the DB string..

Simple 2 way encryption for C#

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

encryption method RijndaelManaged rm new RijndaelManaged Create an encryptor and a decryptor using our encryption method key.. encryption method key and vector. EncryptorTransform rm.CreateEncryptor this.Key this.Vector DecryptorTransform rm.CreateDecryptor.. this.Key this.Vector DecryptorTransform rm.CreateDecryptor this.Key this.Vector Used to translate bytes to text..

Encrypt/Decrypt string in .NET

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

key new Rfc2898DeriveBytes sharedSecret _salt Create a RijndaelManaged object aesAlg new RijndaelManaged aesAlg.Key.. RijndaelManaged aesAlg.Key key.GetBytes aesAlg.KeySize 8 Create a decryptor to perform the stream transform. ICryptoTransform.. the stream transform. ICryptoTransform encryptor aesAlg.CreateEncryptor aesAlg.Key aesAlg.IV Create the streams used for encryption...

Using AES encryption in C#

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

Main try string original Here is some data to encrypt Create a new instance of the RijndaelManaged class. This generates.. 0 throw new ArgumentNullException Key byte encrypted Create an RijndaelManaged object with the specified key and IV. using.. rijAlg new RijndaelManaged rijAlg.Key Key rijAlg.IV IV Create a decrytor to perform the stream transform. ICryptoTransform..

How do I convert Word files to PDF programmatically?

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

using System.IO using System.Linq using System.Text ... Create a new Microsoft Word application object Microsoft.Office.Interop.Word.Application..

Deep cloning objects in C#

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

in C# I want to do something like myObject myObj GetmyObj Create and fill a new object myObject newObj myObj.Clone And then make..

Create Generic method constraining T to an Enum

http://stackoverflow.com/questions/79126/create-generic-method-constraining-t-to-an-enum

Generic method constraining T to an Enum I'm building a function..

Soft Delete Entity Framework Code First

http://stackoverflow.com/questions/12698793/soft-delete-entity-framework-code-first

indexes to this public override void Up Sql String.Format CREATE UNIQUE INDEX 0 ON dbo.Organisations Name WHERE IsDeleted 0 IX_NaturalKey..

Sending an array of values to Oracle procedure to use in WHERE IN clause

http://stackoverflow.com/questions/13580245/sending-an-array-of-values-to-oracle-procedure-to-use-in-where-in-clause

clause I have a stored procedure in Oracle as shown below CREATE PROCEDURE MY_TEST_PROC CUR OUT SYS_REFCURSOR PARAM_THAT_WILL_BE..

How to create initializer to create and migrate mysql database?

http://stackoverflow.com/questions/15796115/how-to-create-initializer-to-create-and-migrate-mysql-database

GumpDatabase context context.Database.ExecuteSqlCommand CREATE UNIQUE INDEX Name ON Stations Name Other stuff Or I can create.. GumpDatabase context context.Database.ExecuteSqlCommand CREATE UNIQUE INDEX Name ON Stations Name context.Database.ExecuteSqlCommand.. Name ON Stations Name context.Database.ExecuteSqlCommand CREATE UNIQUE INDEX Name ON Sequences Name context.Database.ExecuteSqlCommand..

How to create “embedded” SQL 2008 database file if it doesn't exist?

http://stackoverflow.com/questions/1715691/how-to-create-embedded-sql-2008-database-file-if-it-doesnt-exist

database public virtual void CreateNew string createDDL @ CREATE DATABASE this.DBName this.BuildMasterConnectionString this.DBConnection.Open.. null finally this.DBConnection.Close createDDL @ CREATE TABLE AAASchemaVersion Version int NOT NULL DateCreated datetime.. is a tad more complex but basically runs stuff like this CREATE TABLE AuditUser ID int IDENTITY 1 1 NOT NULL UserSourceTypeID..

Capture Stored Procedure print output in .NET

http://stackoverflow.com/questions/1880471/capture-stored-procedure-print-output-in-net

to access the outprint 'word' from following PROC The PROC CREATE PROC usp_PrintWord AS PRINT 'word' Some C# Code to would like..

What's the fastest way to bulk insert a lot of data in SQL Server (C# client)

http://stackoverflow.com/questions/24200/whats-the-fastest-way-to-bulk-insert-a-lot-of-data-in-sql-server-c-client

for more. I have a simple table that looks like this CREATE TABLE BulkData ContainerId int NOT NULL BinId smallint NOT NULL..

Entity Framework: Setting a Foreign Key Property

http://stackoverflow.com/questions/480872/entity-framework-setting-a-foreign-key-property

Key Property We have a table that looks roughly like this CREATE TABLE Lockers UserID int NOT NULL PRIMARY KEY foreign key LockerStyleID..

Does Entity Framework Code First support stored procedures?

http://stackoverflow.com/questions/4845246/does-entity-framework-code-first-support-stored-procedures

your s.p.'s will get clobbered. You may need to add the CREATE PROCEDURE statements in your code. For EF 4.2 var customers..

Unique key with EF code first

http://stackoverflow.com/questions/5701608/unique-key-with-ef-code-first

Seed MyContext context context.Database.ExecuteSqlCommand CREATE UNIQUE INDEX IX_Category_Title ON Categories Title And you..

When is it better to store flags as a bitmask rather than using an associative table?

http://stackoverflow.com/questions/5708239/when-is-it-better-to-store-flags-as-a-bitmask-rather-than-using-an-associative-t

would be something like select from user where permsission CREATE TRUE haven't got access to SQL Server today on the road . That..

Import XML to SQL using C#

http://stackoverflow.com/questions/772946/import-xml-to-sql-using-c-sharp

complete. In SQL I have three tables that look like this CREATE TABLE dbo . Racuni BROJ varchar 12 NULL DATUM datetime NULL.. br_rac Char 12 kasa_id Char 3 npl_id Integer iznos Money CREATE TABLE dbo . Stavke br_rac varchar 12 NULL kasa_id char 3 NULL..

Entity Framework Stored Procedure Table Value Parameter

http://stackoverflow.com/questions/8157345/entity-framework-stored-procedure-table-value-parameter

AS and the User Defined Table looks like the following... CREATE TYPE dbo . udt_Warnings AS TABLE WarningCode nvarchar 5 NULL..

Entity Framework Code First Fluent Api: Adding Indexes to columns

http://stackoverflow.com/questions/8262590/entity-framework-code-first-fluent-api-adding-indexes-to-columns

something like this context.Database.ExecuteSqlCommand CREATE INDEX IX_NAME ON ... I would very much like to avoid raw SQL..

How do I upload a file to an SFTP server in C# / .NET? [closed]

http://stackoverflow.com/questions/86458/how-do-i-upload-a-file-to-an-sftp-server-in-c-sharp-net