¡@

Home 

c# Programming Glossary: there

Should Usings be inside or outside the namespace

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

my using statements should be inside the namespace. Is there a technical reason for putting the using statements inside instead.. Math might be a bad name for a user defined class since there's already one in System the point here is just that there is.. there's already one in System the point here is just that there is a difference and it affects the maintainability of your code...

String vs string in C# [duplicate]

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

string is an alias for System.String . So technically there is no difference. It's like int vs. System.Int32 . As far as..

Deserialize JSON into C# dynamic object?

http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object

JSON into C# dynamic object Is there a way to deserialize JSON content into a C# 4 dynamic type It..

Dynamic LINQ OrderBy on IEnumerable<T>

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

the method included only works on IQueryable T . Is there any way to get this functionality on IEnumerable T c# linq..

Casting vs using the 'as' keyword in the CLR

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

or object type conversion. What I'd like to know is if there is a difference between these two methods of conversion public.. here _myCls1 MyClass _MyObj _myCls2 _MyObj as MyClass If there is a difference is there a cost difference or how does this.. _myCls2 _MyObj as MyClass If there is a difference is there a cost difference or how does this affect my program Hopefully..

Use of Application.DoEvents()

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

paint messages it delivers everything else as well. And there's a set of notifications that cause trouble. They come from.. again failure modes are solved. Or to put it another way there is no way for the user to make your program run code in a different..

Creating a blocking Queue<T> in .NET?

http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net

right now and my question is How can this be improved Is there an object that already enables this behavior in the BCL that..

Proper use of the IDisposable interface

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

do you really want to leave 250MB of memory just sitting there waiting for the garbage collector to eventually come along and.. collector to eventually come along and free it What if there's an open database connection Surely we don't want that connection.. user forgot to Dispose Warning subtle bug Keep reading But there's a bug in that code. You see the garbage collector runs on..

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

humans financial values are the most obvious example but there are others too. Consider the score given to divers or ice skaters..

What's the difference between String and string?

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

string is an alias for System.String . So technically there is no difference. It's like int vs. System.Int32 . As far as..

Random number generator only generating one random number

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

Random does not make any guarantees of thread safety. Thus there are two valid approaches synchronize so that we don't access..

Deep cloning objects in C#

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

individually but it always leaves me with the feeling that there is a better or more elegant way of handling the situation. How..

Is there a way to check if a file is in use?

http://stackoverflow.com/questions/876473/is-there-a-way-to-check-if-a-file-is-in-use

there a way to check if a file is in use I'm writing a program in..

Should Usings be inside or outside the namespace

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

stylecop code organization share improve this question There is actually a subtle difference between the two. Imagine you..

Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on

http://stackoverflow.com/questions/142003/cross-thread-operation-not-valid-control-accessed-from-a-thread-other-than-the

was created on I have a scenario. Windows Forms C# .NET There is a main form which hosts some user control. The user control..

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

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

works only for Excel 2007 2010 format files .xlsx files . There are a few known bugs with each library as noted in the comments...

Best way to copy between two Stream instances

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

method input.CopyTo output For .NET 3.5 and before There isn't anything baked into the framework to assist with this..

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

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

c# coding style share improve this question There are several usages of this keyword in C#. To qualify members..

Automating the InvokeRequired code pattern

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

value RtfHelpers.AddMissingStyles richEditControl1 There is no need to pass the control as parameter to the delegate...

What are the correct version numbers for C#?

http://stackoverflow.com/questions/247621/what-are-the-correct-version-numbers-for-c

Major features async programming caller info attributes. There is no such thing as C# 3.5 the cause of confusion here is that..

How to convert UNIX timestamp to DateTime and vice versa?

http://stackoverflow.com/questions/249760/how-to-convert-unix-timestamp-to-datetime-and-vice-versa

to DateTime and vice versa As the title says really. There is this example code but then it starts talking about millisecond..

Why is lock(this) {…} bad?

http://stackoverflow.com/questions/251391/why-is-lockthis-bad

object read only. lock person.Name while person.Age 23 There will be a lock on 'person' due to the LockThis method running..

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

ba string hex BitConverter.ToString ba return hex.Replace There are even more variants of doing it for example here . The reverse..

Case insensitive 'Contains(string)'

http://stackoverflow.com/questions/444798/case-insensitive-containsstring

true string title ASTRINGTOTEST title.Contains string There doesn't seem to be an overload that allows me to set the case..

Casting vs using the 'as' keyword in the CLR

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

whether TargetType is a reference type or a value type. There may be other cases involving generics where is is useful because.. laptop these all execute in about 60ms. Two things to note There's no significant difference between them. In fact there are..

Protect .NET code from reverse engineering?

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

engineering share improve this question You can't. There are steps you can take to make it a little more difficult but.. very real chance people are going to pirate your software. There are some people who are never going to pay for your application.. and these are the people you don't need to worry about. There are however many businesses out there who would never risk a..

Proper use of the IDisposable interface

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

world can call in order to clean up unmanaged resources. There is even a standardized name for this method public void Dispose.. a standardized name for this method public void Dispose There was even an interface created IDisposable that has just that.. we have freed unmanaged resources freed managed resources There's no point in the GC running the finalizer everything's taken..

How to use HTML Agility pack

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

htmlDoc new HtmlAgilityPack.HtmlDocument There are various options set as needed htmlDoc.OptionFixNestedTags.. the Load and LoadXML methods will process your HTML XHTML. There is also a compiled help file called HtmlAgilityPack.chm that..

How can I detect the encoding/codepage of a text file

http://stackoverflow.com/questions/90838/how-can-i-detect-the-encoding-codepage-of-a-text-file

head in the sand and pretend that plain text is ASCII. There Ain't No Such Thing As Plain Text. If you have a string in memory..