¡@

Home 

c# Programming Glossary: declare

What does “DateTime?” mean in C#?

http://stackoverflow.com/questions/109859/what-does-datetime-mean-in-c

a class you get a DateTime object not a reference when you declare a field or variable of that type. And in the same way as an..

C# How to find if an event is hooked up

http://stackoverflow.com/questions/1129517/c-sharp-how-to-find-if-an-event-is-hooked-up

and that is that an event has an invocation list. If you declare the event using the C# event keyword the compiler will generate..

Bundler not including .min files

http://stackoverflow.com/questions/11980458/bundler-not-including-min-files

files with extension .min.js In my BundleConfig class I declare public static void RegisterBundles BundleCollection bundles.. .Include ~ Scripts jquery.tmpl.min.js In my view I declare html head @Scripts.Render ~ Scripts jquery head body test body..

Expression Versus Statement

http://stackoverflow.com/questions/19132/expression-versus-statement

isn't there in standard C for example only a statement can declare a new local variable&mdash but this ability is useful enough.. provides a GNU extension that enables an expression to declare a local variable as well. Designers of other languages didn't..

.NET: What are attributes?

http://stackoverflow.com/questions/20346/net-what-are-attributes

about your objects methods properties. For example I might declare an Attribute called DisplayOrder so I can easily control in..

What's the point of the var keyword?

http://stackoverflow.com/questions/209199/whats-the-point-of-the-var-keyword

to take things a step further by making it optional to declare a local variable . With Boo both the type and the declaration.. two related questions here actually 1. Why do I have to declare variables at all 2. What use is var in a language that makes.. at all 2. What use is var in a language that makes you declare variables The answers to 1 are numerous and can be found elsewhere..

When do you use the “this” keyword? [closed]

http://stackoverflow.com/questions/23250/when-do-you-use-the-this-keyword

methods To have an object return itself from a method To declare indexers To declare extension methods To pass parameters between.. object return itself from a method To declare indexers To declare extension methods To pass parameters between constructors To..

Why Doesn't C# Allow Static Methods to Implement an Interface?

http://stackoverflow.com/questions/259026/why-doesnt-c-sharp-allow-static-methods-to-implement-an-interface

For a more complicated situation you could always declare another static method and delegate to that. In trying come up..

What are major differences between C# and Java?

http://stackoverflow.com/questions/295224/what-are-major-differences-between-c-sharp-and-java

has no equivalent of partial types C# interfaces cannot declare fields Java has no unsigned integer types Java has no language..

Access to Modified Closure (2)

http://stackoverflow.com/questions/304258/access-to-modified-closure-2

share improve this question Prior to C# 5 you need to re declare a variable inside the foreach otherwise it is shared and all.. Dispose e Note that the variable v which is your list is declared outside of the loop. So by the rules of captured variables..

What is the difference between const and readonly?

http://stackoverflow.com/questions/55984/what-is-the-difference-between-const-and-readonly

this question Apart from the apparent diff of having to declare the value at the time of a definition for a const VS readonly..

Difference between Property and Field in C# 3.0+

http://stackoverflow.com/questions/653536/difference-between-property-and-field-in-c-sharp-3-0

difference from my point of view Now that in C# 3.0 i can declare a property like this public string MyString get set considering..

Understanding events and event handlers in C#

http://stackoverflow.com/questions/803242/understanding-events-and-event-handlers-in-c-sharp

shape of method again void object EventArgs . When you declare an event you are saying which shape of method EventHandler that..

C# Finalize/Dispose pattern

http://stackoverflow.com/questions/898828/c-sharp-finalize-dispose-pattern

directly in B ~B Dispose false Notice that I haven't declared a finalizer in B you should only implement a finalizer if you.. even if SuppressFinalize is called. So you shouldn't declare a finalizer unless you have to but you give inheritors of your.. directly SafeHandle and friends doesn't count as they declare their own finalizers then don't implement a finalizer as the..

How do I access ARP-protocol information through .NET?

http://stackoverflow.com/questions/1148778/how-do-i-access-arp-protocol-information-through-net

int dwAddr MarshalAs UnmanagedType.U4 public int dwType Declare the GetIpNetTable function. DllImport IpHlpApi.dll return MarshalAs..

C# : Why doesn't 'ref' and 'out' support polymorphism?

http://stackoverflow.com/questions/1207144/c-sharp-why-doesnt-ref-and-out-support-polymorphism

something from n. That permits this sequence of events Declare a field x of type Animal. Pass x as an out parameter to N. N..

Create COM component and ActiveX controls in .Net (C# and .Net framework 3.5)

http://stackoverflow.com/questions/186640/create-com-component-and-activex-controls-in-net-c-and-net-framework-3-5

Thanks santhosh c# .net share improve this question Declare an interface and implement it with class. If you have parameters..

How to RedirectToAction in ASP.NET MVC without losing request data

http://stackoverflow.com/questions/1936/how-to-redirecttoaction-in-asp-net-mvc-without-losing-request-data

in your Form action you can go public ActionResult Form Declare viewData etc. if TempData form null Cast TempData form to System.Collections.Specialized.NameValueCollection..

Encrypt/Decrypt string in .NET

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

sharedSecret throw new ArgumentNullException sharedSecret Declare the RijndaelManaged object used to decrypt the data. RijndaelManaged.. used to decrypt the data. RijndaelManaged aesAlg null Declare the string used to hold the decrypted text. string plaintext..

SqlException from Entity Framework - New transaction is not allowed because there are other threads running in the session

http://stackoverflow.com/questions/2113498/sqlexception-from-entity-framework-new-transaction-is-not-allowed-because-ther

code public class ProductManager IProductManager #region Declare Models private RivWorks.Model.Negotiation.RIV_Entities _dbRiv..

force browsers to get latest js and css files in asp.net application

http://stackoverflow.com/questions/2185872/force-browsers-to-get-latest-js-and-css-files-in-asp-net-application

way. I just implemented this solution that seems to work. Declare a version variable on your page public string version get set..

Using AES encryption in C#

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

IV null IV.Length 0 throw new ArgumentNullException Key Declare the string used to hold the decrypted text. string plaintext..

Declare a generic type instance dynamically

http://stackoverflow.com/questions/307984/declare-a-generic-type-instance-dynamically

a generic type instance dynamically Is it possible to declare..

Outer Variable Trap

http://stackoverflow.com/questions/3416758/outer-variable-trap

into the Outer Variable Trap. You get output #2. Fix Declare an Inner Variable to be captured repeatedly instead of the Outer..

Define a generic that implements the + operator [duplicate]

http://stackoverflow.com/questions/3598341/define-a-generic-that-implements-the-operator

1 2 have to write genInt.DoSomething 1 2 a b a b Declare your own interface IAddable . Then you can use it as a generic..

C# Service cannot execute batch file?

http://stackoverflow.com/questions/361097/c-sharp-service-cannot-execute-batch-file

proc new System.Diagnostics.Process Declare New Process proc.StartInfo.FileName fileName proc.StartInfo.WindowStyle..

Declare delegate manually, use Func<T> or Action<T>?

http://stackoverflow.com/questions/4482613/declare-delegate-manually-use-funct-or-actiont

delegate manually use Func T or Action T today I was thinking..

How do I suspend painting for a control and its children?

http://stackoverflow.com/questions/487661/how-do-i-suspend-painting-for-a-control-and-its-children

And to whom it may concern this is similar example in VB Declare Function SendMessage Lib user32 Alias SendMessageA ByVal hWnd..

Declare a Const Array

http://stackoverflow.com/questions/5142349/declare-a-const-array

a Const Array Possible Duplicate Declaring a const double in..

openssl using only .NET classes

http://stackoverflow.com/questions/5452422/openssl-using-only-net-classes

iv null iv.Length 0 throw new ArgumentNullException iv Declare the stream used to encrypt to an in memory array of bytes... to an in memory array of bytes. MemoryStream msEncrypt Declare the RijndaelManaged object used to encrypt the data. RijndaelManaged.. iv null iv.Length 0 throw new ArgumentNullException iv Declare the RijndaelManaged object used to decrypt the data. RijndaelManaged..

Itextsharp: Adjust 2 elements on exactly one page

http://stackoverflow.com/questions/7590071/itextsharp-adjust-2-elements-on-exactly-one-page

in the document probably document.SetMargins 0 0 0 0 Declare here init in loop below iTextSharp.text.Image pageImage Loop..

What does the keyword “new” does to a struct in C#?

http://stackoverflow.com/questions/9207488/what-does-the-keyword-new-does-to-a-struct-in-c

Point int y this.y y static void Main string args Declare an object Point myPoint Point myPoint new Point 10 20 Point..

Changing column default values in EF5 Code First

http://stackoverflow.com/questions/11974439/changing-column-default-values-in-ef5-code-first

0 Guid.NewGuid .ToString N string sql string.Format @ DECLARE 0 nvarchar 128 SELECT 0 name FROM sys.default_constraints WHERE..

How to execute a stored procedure within C# program

http://stackoverflow.com/questions/1260952/how-to-execute-a-stored-procedure-within-c-sharp-program

it as stored1 use master go create procedure dbo.test as DECLARE @command as varchar 1000 @i int SET @i 0 WHILE @i 5 BEGIN Print..

SQL Server: Rethrow exception with the original exception number

http://stackoverflow.com/questions/1882788/sql-server-rethrow-exception-with-the-original-exception-number

be able to rethrow it like this .. END TRY BEGIN CATCH DECLARE @errnum int SELECT @errnum ERROR_NUMBER RAISERROR @errnum 16.. and rethrow the original message .. END TRY BEGIN CATCH DECLARE @errnum nchar 5 @errmsg nvarchar 2048 SELECT @errnum RIGHT '00000'..

Is it possible to get the parsed text of a SqlCommand with SqlParameters?

http://stackoverflow.com/questions/2789476/is-it-possible-to-get-the-parsed-text-of-a-sqlcommand-with-sqlparameters

WHERE ID 123 you actually run something more like this DECLARE @ID Int Set @ID RetrieveQueryDataItem @ID SELECT SomeColumn..

Sharing sessions across applications using the ASP.NET Session State Service

http://stackoverflow.com/questions/2868316/sharing-sessions-across-applications-using-the-asp-net-session-state-service

the the same application name in the connection string. DECLARE @connStrAppName nvarchar 50 SET @connStrAppName APP_NAME .NET..

How to catch SQLServer timeout exceptions

http://stackoverflow.com/questions/29664/how-to-catch-sqlserver-timeout-exceptions

sql.Open SqlCommand cmd sql.CreateCommand cmd.CommandText DECLARE @i int WHILE EXISTS SELECT 1 from sysobjects BEGIN SELECT @i..

Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic

http://stackoverflow.com/questions/3965767/function-or-interface-marked-as-restricted-or-the-function-uses-an-automation-t

Need help with some stored procedure

http://stackoverflow.com/questions/4352383/need-help-with-some-stored-procedure

query thereby allowing a single value into your variable. DECLARE @Lang int whatever datatype your QuesID is. SELECT TOP 1 FQ.QuesID..

SQL Server (2008) Pass ArrayList or String to SP for IN()

http://stackoverflow.com/questions/519769/sql-server-2008-pass-arraylist-or-string-to-sp-for-in

nvarchar MAX RETURNS @list_table TABLE id INT AS BEGIN DECLARE @index INT @start_index INT @id INT SELECT @index 1 SELECT @start_index.. on the returned table in your stored procedure like so DECLARE @passed_in_ids TABLE id INT INSERT INTO @passed_in_ids id SELECT..

Issues Doing a String Comparison in LINQ

http://stackoverflow.com/questions/578231/issues-doing-a-string-comparison-in-linq

listItem.ZIPCODE 0 select z Generates the following T SQL DECLARE @p0 INT @p1 CHAR 6 @p2 CHAR 6 SET @p0 12 SET @p1 '85546 ' SET..

Dynamic linq query with multiple/unknown criteria

http://stackoverflow.com/questions/6453420/dynamic-linq-query-with-multiple-unknown-criteria

id.ToString With an SQL generated of Region Parameters DECLARE @p0 VarChar 1000 'Chris' DECLARE @p1 VarChar 1000 'email1@domain.com'.. of Region Parameters DECLARE @p0 VarChar 1000 'Chris' DECLARE @p1 VarChar 1000 'email1@domain.com' DECLARE @p2 VarChar 1000.. 1000 'Chris' DECLARE @p1 VarChar 1000 'email1@domain.com' DECLARE @p2 VarChar 1000 'email2@domain.com' DECLARE @p3 Int 1 EndRegion..

How Can i display the output of SQL “PRINT” Command in C#?

http://stackoverflow.com/questions/8689336/how-can-i-display-the-output-of-sql-print-command-in-c

is the PROCEDURE ALTER PROC ResultsPoll @pollid INT AS DECLARE @count1 INT DECLARE @count2 INT DECLARE @count3 INT DECLARE.. ALTER PROC ResultsPoll @pollid INT AS DECLARE @count1 INT DECLARE @count2 INT DECLARE @count3 INT DECLARE @count4 INT DECLARE.. @pollid INT AS DECLARE @count1 INT DECLARE @count2 INT DECLARE @count3 INT DECLARE @count4 INT DECLARE @count5 INT DECLARE..

String.IsNullOrWhiteSpace in LINQ Expression

http://stackoverflow.com/questions/9606979/string-isnullorwhitespace-in-linq-expression

For Linq to Entities this gets translated into DECLARE @p0 VarChar 1000 '' ... WHERE NOT t0 . Diameter IS NULL OR LTRIM.. @p0 and for Linq to SQL almost but not quite the same DECLARE @p0 NVarChar 1000 '' ... WHERE NOT LTRIM RTRIM t0 . TypeName..