¡@

Home 

c# Programming Glossary: also

Should Usings be inside or outside the namespace

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

and it affects the maintainability of your code. It's also interesting to note what happens if Foo is in namespace Outer..

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

or wrong. I'm new to threading. How do I resolve this and also what is the effect of execution of Line#1 if block The situation..

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

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

files. I will look more into the 2003 xml format but that also puts a Excel 2003 requirement on the file. I am currently looking.. support in the future for newer 2007 2010 formats. You can also use EPPlus which works only for Excel 2007 2010 format files.. ds Creating the Excel file is as easy as that. You can also manually create Excel files but the above functionality is what..

How to properly clean up Excel interop objects

http://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects

I found the solution to my problem on this page which also has a nice rule for the usage of COM objects in C# Never use..

Simple 2 way encryption for C#

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

Decrypt methods that work with URL friendly string . It also has the methods that work with byte arrays. NOTE you should..

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

stop and explain what one of these are. The code needs to also inform the already running instance that the user tried to start.. that the user tried to start a second one and maybe also pass any command line arguments if any existed. c# .net wpf..

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

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

the this keyword. I tend to use it in constructors but may also use it throughout the class in other methods. Some examples..

What is the difference between a field and a property in C#?

http://stackoverflow.com/questions/295104/what-is-the-difference-between-a-field-and-a-property-in-c

or serve other purposes. @GSS points out that you can also do other logic such as validation when a property is accessed..

How to Deserialize XML document

http://stackoverflow.com/questions/364253/how-to-deserialize-xml-document

anymore...the position was at the end of the stream . I also took a few liberties with the naming . Here are the classes..

Why is it important to override GetHashCode when Equals method is overridden?

http://stackoverflow.com/questions/371328/why-is-it-important-to-override-gethashcode-when-equals-method-is-overridden

... return hash Oh for convenience you might also consider providing and operators when overriding Equals and..

Casting vs using the 'as' keyword in the CLR

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

rather have a convention which I can use consistently. I also maintain that the as then null check gives a better separation..

Random number generator only generating one random number

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

breaking the internal implementation and we could also start getting the same numbers from different threads which..

Deep cloning objects in C#

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

gets too complex. And with the use of extension methods also from the originally referenced source In case you prefer to..

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

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

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

How to use HTML Agility pack

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

in your own application. The HtmlDocument.Load method also accepts a stream which is very useful in integrating with other.. and LoadXML methods will process your HTML XHTML. There is also a compiled help file called HtmlAgilityPack.chm that has a complete..

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

they do not have a clue about codepages. The receivers are also end users by now this is what they know about codepages Codepages..

Virtual member call in a constructor

http://stackoverflow.com/questions/119506/virtual-member-call-in-a-constructor

see Eric Lippert's blog for details as to why this is . Also in .NET objects do not change type as they are constructed but..

Parse JSON in C#

http://stackoverflow.com/questions/1212344/parse-json-in-c-sharp

T serializer.ReadObject ms Your missing line return obj Also just for reference here is the Serialize method public static..

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

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

but it requires Excel to be on the machine you are using. Also the OLEDB method is intriguing but may not yield much more than.. seems to be more actively updated and documented as well. Also as noted by @ мЦа ионов below EPPlus has support for Pivot Tables..

Understanding Garbage Collection in .net

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

code instruction where that variable is no longer used. Also whether that variable is stored on the stack frame or a cpu..

Using CookieContainer with WebClient class

http://stackoverflow.com/questions/1777221/using-cookiecontainer-with-webclient-class

and requires less repetitive code than the second option. Also the derivation approach works the same way for multiple extensibility..

String vs string in C# [duplicate]

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

the case Example string s Hello World String S Hello World Also what are the guidelines for the use of each c# string share..

When to Use Static Classes in C#

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

for methods not associated with particular objects. Also a static class can make your implementation simpler and faster.. to set multiple interdependent values at the same time. Also if a method has grown to this amount of complexity it most likely..

Is there a string math evaluator in .NET?

http://stackoverflow.com/questions/355062/is-there-a-string-math-evaluator-in-net

COM and use code like this to evaluate an expression. Also works for JScript. Dim sc As New MSScriptControl.ScriptControl..

How to Deserialize XML document

http://stackoverflow.com/questions/364253/how-to-deserialize-xml-document

Make and Model values are elements not attributes. Also I removed the reader.ReadToEnd that function reads the whole..

Best practices for exception management in Java or C#

http://stackoverflow.com/questions/409563/best-practices-for-exception-management-in-java-or-c-sharp

is warning the system what else needs to be warned . Also this is a pretty choice comment from m3rLinEz . I tend to agree..

.NET String to byte Array C#

http://stackoverflow.com/questions/472906/net-string-to-byte-array-c-sharp

do I convert a string to a byte array in .NET C# Update Also please explain why encoding should be taken into consideration...

Casting vs using the 'as' keyword in the CLR

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

I moved it up here at the suggestion of Michael Haren. Also I want to thank everyone who's provided insight and perspective..

Protect .NET code from reverse engineering?

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

the registration mechanism can't be reverse engineered Also it is possible to convert a C# application to native code and..

How do parameterized queries help against SQL injection?

http://stackoverflow.com/questions/5468425/how-do-parameterized-queries-help-against-sql-injection

INSERT into Cars values tagnumber.Text then is it the same Also here I would use Regular Expression validation to stop insertion..

What is the difference between const and readonly?

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

Aku needs to get a mention coz he pointed this out first. Also I need to plug where I learned this.. Effective C# Bill Wagner..

What's the difference between String and string?

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

the case Example string s Hello World String S Hello World Also what are the guidelines for the use of each c# string share..

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..

What's the use/meaning of the @ character in variable names in C#?

http://stackoverflow.com/questions/91817/whats-the-use-meaning-of-the-character-in-variable-names-in-c

2008 c# documentation but couldn't find anything about it. Also searching Google didn't give me any useful answers. So what..