ˇ@

Home 

c# Programming Glossary: pass

Get property value from string using reflection in C#

http://stackoverflow.com/questions/1196991/get-property-value-from-string-using-reflection-in-c-sharp

using only a single string as the parameter. I want to pass a class and property in the string and resolve the value of..

Difference between ref and out parameters in .NET [duplicate]

http://stackoverflow.com/questions/135234/difference-between-ref-and-out-parameters-in-net

much the same the only difference is that a variable you pass as an out parameter doesn't need to be initialised and the method..

Solution for overloaded operator constraint in .NET generics

http://stackoverflow.com/questions/147646/solution-for-overloaded-operator-constraint-in-net-generics

ICalc T T Add T T T Subtract T T etc but then you need to pass an ICalc T through all the methods which gets messy. share..

TransactionScope automatically escalating to MSDTC on some machines?

http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines

object is marshaled by value meaning that any attempt to pass it across an application domain boundary even in the same process.. in serialization of the transaction object. You can pass the transaction objects by making a call on a remote method.. we want to use TransactionScope we're going to need to be passing a single SqlConnection object around...which seems problematic..

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

that the user tried to start a second one and maybe also pass any command line arguments if any existed. c# .net wpf mutex..

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

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

qualify members hidden by similar name To have an object pass itself as a parameter to other methods To have an object return.. method To declare indexers To declare extension methods To pass parameters between constructors To internally reassign value..

How to use reflection to call generic Method?

http://stackoverflow.com/questions/232535/how-to-use-reflection-to-call-generic-method

myType generic.Invoke this null EDIT For a static method pass null as the first argument to Invoke . That's nothing to do..

Automating the InvokeRequired code pattern

http://stackoverflow.com/questions/2367718/automating-the-invokerequired-code-pattern

richEditControl1 There is no need to pass the control as parameter to the delegate. C# automatically creates..

When to Use Static Classes in C#

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

static methods static classes are useless when we need to pass them around by their interface. This renders us unable to use.. of a strategy pattern. We might patch some issues up by passing delegates instead of interfaces . Testing This basically..

High Quality Image Scaling C#

http://stackoverflow.com/questions/249587/high-quality-image-scaling-c-sharp

jpeg create a collection of all parameters that we will pass to the encoder EncoderParameters encoderParams new EncoderParameters..

How do you convert Byte Array to Hexadecimal String, and vice versa?

http://stackoverflow.com/questions/311165/how-do-you-convert-byte-array-to-hexadecimal-string-and-vice-versa

can improve performance for long strings by using a single pass parser like so public static byte StringToByteArray String hex..

Linq Distinct on a particular Property

http://stackoverflow.com/questions/489258/linq-distinct-on-a-particular-property

the default comparer for the keys though if you want to pass in an equality comparer just pass it on to the HashSet constructor... though if you want to pass in an equality comparer just pass it on to the HashSet constructor. share improve this answer..

Casting vs using the 'as' keyword in the CLR

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

rather than a local variable. It's possible for the if to pass but then the cast to fail if another thread changes the value..

What is the purpose of self tracking entities?

http://stackoverflow.com/questions/5091974/what-is-the-purpose-of-self-tracking-entities

to serve single call . Client will make changes in STE and pass it back in another web service call. Service will be able to..

Proper use of the IDisposable interface

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

Finalize and Dispose both call a third method where you pass a Boolean saying if you're calling it from Dispose as opposed..

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

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

under which the program runs is duplicated including password on the remote machine as a local user. Basically leverage.. same domain and even if it has a different username and password. Once you have used WNetUseConnection you will be able to.. WNetUseConnection . Note for the NetResource you should pass null for the lpLocalName and lpProvider. The dwType should be..

Create Generic method constraining T to an Enum

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

Enum or am I going to have to mimic the Parse function and pass a type as an attribute which forces the ugly boxing requirement.. T must be an enumerated type ... This will still permit passing of value types implementing IConvertible. The chances are..

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

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

this sequence of events Declare a field x of type Animal. Pass x as an out parameter to N. N writes a Tiger into n which is..

Why use ref keyword when passing an Object?

http://stackoverflow.com/questions/186891/why-use-ref-keyword-when-passing-an-object

as a reference. c# .net share improve this question Pass a ref if you want to change what the object is TestRef t new..

A C# equivalent of C's fread file i/o

http://stackoverflow.com/questions/1935851/a-c-sharp-equivalent-of-cs-fread-file-i-o

in foobarStruct Is there cannot be an empty constructor. Pass in a block of memory as a byte array into the constructor when..

Class with single method — best approach?

http://stackoverflow.com/questions/205689/class-with-single-method-best-approach

myObject new MyClass arg1 arg2 arg3 myObject.myMethod Pass arguments to method MyClass myObject new MyClass myObject.myMethod.. myObject new MyClass myObject.myMethod arg1 arg2 arg3 Pass arguments to static method MyClass.myMethod arg1 arg2 arg3 EDIT..

Pass Method as Parameter using C#

http://stackoverflow.com/questions/2082615/pass-method-as-parameter-using-c-sharp

Method as Parameter using C# I have several methods all with..

Pass C# string to C++ and pass C++ result (string, char*.. whatever) to C#

http://stackoverflow.com/questions/2179270/pass-c-sharp-string-to-c-and-pass-c-result-string-char-whatever-to-c-s

C# string to C and pass C result string char .. whatever to..

C# Thread Termination and Thread.Abort()

http://stackoverflow.com/questions/2251964/c-sharp-thread-termination-and-thread-abort

when calling Abort it is generally not advisable to do so. Pass a message to the thread requesting termination instead. share..

Is it better to create a singleton to access unity container or pass it through the application?

http://stackoverflow.com/questions/2386487/is-it-better-to-create-a-singleton-to-access-unity-container-or-pass-it-through

injection framework seems a little on the odd side. Pass the IUnityContainer to my TestSuiteParser class and every child.. it is n levels deep or in reality about 3 levels deep . Passing IUnityContainer around everywhere just looks odd. I may just..

Write text files without Byte Order Mark (BOM)?

http://stackoverflow.com/questions/2437666/write-text-files-without-byte-order-mark-bom

False for the encoderShouldEmitUTF8Identifier parameter. Pass the UTF8Encoding instance to the stream constructor. Example..

C# Object Pooling Pattern implementation

http://stackoverflow.com/questions/2510975/c-sharp-object-pooling-pattern-implementation

clean abstraction delegates. private Func Pool T T factory Pass this through the pool's constructor and we're about done with..

Pass An Instantiated System.Type as a Type Parameter for a Generic Class

http://stackoverflow.com/questions/266115/pass-an-instantiated-system-type-as-a-type-parameter-for-a-generic-class

An Instantiated System.Type as a Type Parameter for a Generic..

Pass C# ASP.NET array to Javascript array

http://stackoverflow.com/questions/3464498/pass-c-sharp-asp-net-array-to-javascript-array

C# ASP.NET array to Javascript array Does anyone know how to..

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

Server 2008 Pass ArrayList or String to SP for IN I was wondering how I can..

Pass-through mouse events to parent control

http://stackoverflow.com/questions/547172/pass-through-mouse-events-to-parent-control

through mouse events to parent control Environment .NET Framework..

Strongly typed dynamic Linq sorting

http://stackoverflow.com/questions/557819/strongly-typed-dynamic-linq-sorting

Movies select m Get our list var sorter list.GetSorter ... Pass in some global user settings object sorter.AddSort NAME m m.Name..

Best algorithm for evaluating a mathematical expression?

http://stackoverflow.com/questions/572796/best-algorithm-for-evaluating-a-mathematical-expression

a method pointer which evaluates the expression quickly. Pass the variables in by reference and you can change them directly..

Associating enums with strings in C#

http://stackoverflow.com/questions/630803/associating-enums-with-strings-in-c-sharp

static LogCategory Error get return new LogCategory Error Pass in type safe string values as a parameter public static void..

Event Bubbling and MVP: ASP.NET

http://stackoverflow.com/questions/8851933/event-bubbling-and-mvp-asp-net

I am setting a sample value for the variable śmonthValueToPass since I don ™t know how to do it properly . How do I set the.. to do it properly . How do I set the value for monthValueToPass variable to make it comply with MVP model string monthValueToPass.. to make it comply with MVP model string monthValueToPass TEST monthPresenter.SetMonth monthValueToPass The expectation..