¡@

Home 

c# Programming Glossary: note

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

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

data from a database and creating a workbook from it. Note that the ExcelLibrary code is the single line at the bottom..

Best way to copy between two Stream instances

http://stackoverflow.com/questions/230128/best-way-to-copy-between-two-stream-instances

output Code from here on will be run in a continuation. Note that depending on where the call to CopyToAsync is made the..

Getting key of value of a generic Dictionary?

http://stackoverflow.com/questions/255341/getting-key-of-value-of-a-generic-dictionary

second firsts seconds.Add second firsts.Add first Note potential ambiguity using indexers e.g. mapping from int to..

C# Captured Variable In Loop

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

if you refer to variables in multiple scopes but it works Note that a more common occurrence of this problem is using for or..

How to detect Windows 64-bit platform with .NET?

http://stackoverflow.com/questions/336633/how-to-detect-windows-64-bit-platform-with-net

any other method to know the correct platform 32 or 64 bit Note that it should also detect 64 bit when run as a 32 bit application..

Dynamic LINQ OrderBy on IEnumerable<T>

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

it . But here's a way to do it with LINQ to Objects. Note that the choice of Hashtable is due to favorable locking semantics..

How to get Frequency from FFT result

http://stackoverflow.com/questions/4364823/how-to-get-frequency-from-fft-result

129.2 Hz 4 ... 5 ... ... 511 511 44100 1024 22006.9 Hz Note that for a real input signal imaginary parts all zero the second..

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

both for console Windows Forms and other project types. Note that you need to set the scope property of your settings. If..

Casting vs using the 'as' keyword in the CLR

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

null Do stuff with convertedRandomObject.Value Note currently this is actually slower than is cast . I think it's.. thought of using a nullable type and as together EDIT Note that none of the above talks about performance other than the..

Proper use of the IDisposable interface

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

know whether or not it needs to call DeleteHandle . Note What is an unmanaged resource If you found it in the Microsoft.. your object Then they would leak some unmanaged resources Note They won't leak managed resources because eventually the garbage.. finally gets around to freeing i.e. finalizing our object. Note The garbage collector will eventually free all managed objects...

How do I convert Word files to PDF programmatically?

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

files opens them in Word and then saves them as a PDF. Note that you'll need to add a reference to Microsoft.Office.Interop.Word..

Random row from Linq to Sql

http://stackoverflow.com/questions/648196/random-row-from-linq-to-sql

your filter orderby ctx.Random select row .FirstOrDefault Note that this is only suitable for small to mid size tables for..

LINQ to read XML

http://stackoverflow.com/questions/670563/linq-to-read-xml

a C# code using LINQ the simplest way to print this result Note the extra space if it is a level2 node A A1 A2 B B1 B2 C Currently..

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

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

MyColor.Red MyColor.Green MyColor.Blue Note that Flags by itself doesn't change this at all all it does..

Difference Between Equals and ==

http://stackoverflow.com/questions/971954/difference-between-equals-and

the implementation in Object also checks for identity. Note that this depends on the execution time type rather than the..

How to use localization in C#

http://stackoverflow.com/questions/1142802/how-to-use-localization-in-c-sharp

Hello . Now add a new resource file named strings.fr.resx note the fr part this one will contain resources in French . Add..

Should Usings be inside or outside the namespace

http://stackoverflow.com/questions/125319/should-usings-be-inside-or-outside-the-namespace

the maintainability of your code. It's also interesting to note what happens if Foo is in namespace Outer rather than Outer.Inner..

Understanding Garbage Collection in .net

http://stackoverflow.com/questions/17130382/understanding-garbage-collection-in-net

code. Note how the extra braces have no effect at all. And note how setting the variable to null makes no difference at all... that even though it seemed to have an effect. One final note about this topic this is what gets programmers in trouble that..

Which .NET Dependency Injection frameworks are worth looking into? [closed]

http://stackoverflow.com/questions/21288/which-net-dependency-injection-frameworks-are-worth-looking-into

I might be being a bit picky here but it's important to note DI Dependency Injection is a programming pattern and is facilitated..

String vs string in C# [duplicate]

http://stackoverflow.com/questions/215255/string-vs-string-in-c-sharp

In C# what is the difference between String and string note the case Example string s Hello World String S Hello World Also..

What is a good pattern for using a Global Mutex in C#?

http://stackoverflow.com/questions/229565/what-is-a-good-pattern-for-using-a-global-mutex-in-c

edited by acidzombie24 var hasHandle false try try note you may want to time out here instead of waiting forever edited..

ObservableCollection that also monitors changes on the elements in collection

http://stackoverflow.com/questions/269073/observablecollection-that-also-monitors-changes-on-the-elements-in-collection

inside ContainerElementChanged Thoughts EDIT Should note that the BCL ObservableCollection only exposes the INotifyPropertyChanged.. thanks Mark EDIT4 Wow this is really learn as you go . KP noted that the event was fired with the collection as sender and..

C# member variable initialization; best practice?

http://stackoverflow.com/questions/298183/c-sharp-member-variable-initialization-best-practice

this public Bar string foo Foo foo edit as a side comment note that in the above if there are other fields not shown with field..

Dynamic LINQ OrderBy on IEnumerable<T>

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

more fun if you want to mix that with dynamic although note that dynamic only applies to LINQ to Objects expression trees..

Casting vs using the 'as' keyword in the CLR

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

performance other than the value type case where I've noted that unboxing to a nullable value type is actually slower but.. my laptop these all execute in about 60ms. Two things to note There's no significant difference between them. In fact there..

Use of Application.DoEvents()

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

to hell. Back to ShowDialog . It executes DoEvents but do note that it does something else. It disables all the windows in..

Developing Internet Explorer Extensions?

http://stackoverflow.com/questions/5643819/developing-internet-explorer-extensions

it working with Internet Explorer 8 in Windows 7 x64 ... note that I could not test in other configurations. Hope you understand..

What is the difference between Decimal, Float and Double in C#?

http://stackoverflow.com/questions/618535/what-is-the-difference-between-decimal-float-and-double-in-c

type instead of a fixed point type. The important thing to note is that humans are used to representing non integers in a decimal..

In C#, why can't a List<string> object be stored in a List<object> variable

http://stackoverflow.com/questions/6557/in-c-why-cant-a-liststring-object-be-stored-in-a-listobject-variable

the Foo could not be converted to string As a side note I think it would be more significant whether or not you can..

What's the difference between String and string?

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

In C# what is the difference between String and string note the case Example string s Hello World String S Hello World Also..

Is it possible to dynamically compile and execute C# code fragments?

http://stackoverflow.com/questions/826398/is-it-possible-to-dynamically-compile-and-execute-c-sharp-code-fragments

.NET languages is to use the CodeDOM for such things. As a note its other main purpose is for dynamically constructing bits..

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

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

.ToString Spades Diamonds It is also important to note that Flags does not automatically make the enum values powers..

C# Finalize/Dispose pattern

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

differently even if you later suppress the finalizer. Also note that even though B doesn't have a finalizer it still calls SuppressFinalize..

ExecuteReader requires an open and available Connection. The connection's current state is Connecting

http://stackoverflow.com/questions/9705637/executereader-requires-an-open-and-available-connection-the-connections-curren

connection you could also use a SqlDataReader instead note that a DataTable does not need to be disposed since it does..

How to config socket connect timeout in C#

http://stackoverflow.com/questions/1062035/how-to-config-socket-connect-timeout-in-c-sharp

result.AsyncWaitHandle.WaitOne 5000 true if success NOTE MUST CLOSE THE SOCKET socket.Close throw new ApplicationException..

How to get timestamp of tick precision in .NET / C#?

http://stackoverflow.com/questions/1416139/how-to-get-timestamp-of-tick-precision-in-net-c

timestamps right What do you think about that hack NOTE StopWatch.ElapsedTicks is different from StopWatch.Elapsed.Ticks.. . I just learned this the hard way. NOTE 2 Using the StopWatch approach I noticed it gets out of sync..

Simple 2 way encryption for C#

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

. It also has the methods that work with byte arrays. NOTE you should use different values in the Key and Vector arrays.. decryptedBytes Convert a string to a byte array. NOTE Normally we'd create a Byte Array from a string using an ASCII..

C# - Convert UTC/GMT time to local time

http://stackoverflow.com/questions/179940/c-sharp-convert-utc-gmt-time-to-local-time

have one of three time zone options Unspecified Local Utc NOTE If you are wishing to represent a date time other than UTC or..

XML Serialization and Inherited Types

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

add the type named parameter to the Xml declaration easy D NOTE If you use this code I would really appreciate a shout out...

Accessing Password Protected Network Drives in Windows in C#?

http://stackoverflow.com/questions/2563724/accessing-password-protected-network-drives-in-windows-in-c

the network and still communicate with other servers. NOTE Windows NT This value is not supported. summary NetworkCleartext.. uses different credentials for other network connections. NOTE This logon type is supported only by the LOGON32_PROVIDER_WINNT50.. only by the LOGON32_PROVIDER_WINNT50 logon provider. NOTE Windows NT This value is not supported. summary NewCredentials..

Dynamically create a class in C#

http://stackoverflow.com/questions/3862226/dynamically-create-a-class-in-c-sharp

MethodAttributes.RTSpecialName NOTE assuming your list contains Field objects with fields FieldName..

How to execute a command in a remote computer?

http://stackoverflow.com/questions/428276/how-to-execute-a-command-in-a-remote-computer

You may need to reboot the service or the entire machine. NOTE All paths used for the remote process need to be local to the..

When is optimization premature? [closed]

http://stackoverflow.com/questions/4832642/when-is-optimization-premature

something might be slow but you're not too sure just put a NOTE Performance comment and if you later run into bottlenecks check..

EF 4.1 - Code First - JSON Circular Reference Serialization Error

http://stackoverflow.com/questions/5588143/ef-4-1-code-first-json-circular-reference-serialization-error

set public string NPI get set public string Email get set NOTE ADDRESS CLASS IS NEW ADDITION DURING EDIT Address public class..

How to find FQDN of local machine in C#/.NET ?

http://stackoverflow.com/questions/804700/how-to-find-fqdn-of-local-machine-in-c-net

in C# c# localhost fqdn share improve this question NOTE I think this solution only works in the .NET 2.0 and above frameworks...

How to write a scalable Tcp/Ip based server

http://stackoverflow.com/questions/869744/how-to-write-a-scalable-tcp-ip-based-server

C# if possible but any .net language will work BOUNTY NOTE To be awarded the bounty I expect more than a simple answer...

C# Login to Website via program

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

index.do PageModule UsersAction Action UsersLogin NOTE This is the URL the form POSTs to not the URL of the form you..

TypeLoadException says 'no implementation', but it is implemented

http://stackoverflow.com/questions/948785/typeloadexception-says-no-implementation-but-it-is-implemented

fusion typeloadexception share improve this question NOTE If this answer doesn't help you please take the time to scroll..