¡@

Home 

c# Programming Glossary: any

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

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

C# Ideally I would like open source so I don't have to add any third party dependencies to my code and I would like to avoid..

Randomize a List<T> in C#

http://stackoverflow.com/questions/273313/randomize-a-listt-in-c-sharp

c# generic list share improve this question Shuffle any I List with an extension method based on the Fisher Yates shuffle.. Edit Since writing this answer a couple years back many people have commented or written to me to point out the big..

Deserialize JSON into C# dynamic object?

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

data.Items 1 .Price 3.21 as a decimal I'm interested in any discussion about this approach. EDIT I updated the code to fix..

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

Why are mutable structs evil?

http://stackoverflow.com/questions/441309/why-are-mutable-structs-evil

you are changing only that copy not the original and not any other copies which might be around. If your struct is immutable..

Casting vs using the 'as' keyword in the CLR

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

casting clr share improve this question I don't think any of the answers so far at the time of starting this answer have.. in your code unless you really aren't going to do anything with the values afterwards. So let's not worry about the.. attempt to convert the value. To put it another way would anyone ever write int value if int.TryParse text value value int.Parse..

Use of Application.DoEvents()

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

is definitely not easy to grok. Right off the bat almost any Winforms program actually contains a call to DoEvents . It is.. does that it dispatches Windows messages and gets any paint requests delivered. The problem however is that it isn't.. Now that 3 feet problem is solved the user cannot do anything to mess up the logic. Both the close the window and start..

Creating a blocking Queue<T> in .NET?

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

queue queue.Enqueue item if queue.Count 1 wake up any blocked dequeue Monitor.PulseAll queue public T Dequeue .. T item queue.Dequeue if queue.Count maxSize 1 wake up any blocked enqueue Monitor.PulseAll queue return item edit In.. value queue.Dequeue if queue.Count maxSize 1 wake up any blocked enqueue Monitor.PulseAll queue return true share..

Proper use of the IDisposable interface

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

the garbage collector free memory used by MyCollection any faster than it normally would edit So far people have posted.. on a background thread and free the memory associated with any unused objects. This will include your object and any managed.. with any unused objects. This will include your object and any managed objects you use e.g. the Bitmap and the DbConnection..

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

it's good to use decimal. This is usually suitable for any concepts invented by humans financial values are the most obvious.. artefacts of nature which can't really be measured exactly anyway float double are more appropriate. For example scientific..

What's the difference between String and string?

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

I think it's generally recommended to use string any time you're referring to an object. e.g. string place world..

Random number generator only generating one random number

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

is the bigger issue though since Random does not make any guarantees of thread safety. Thus there are two valid approaches..

Deep cloning objects in C#

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

object so that the cloned object can be modified without any changes being reflected in the original object c# .net clone..

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

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

and the None enumerated constant to determine whether any bits in the numeric value are set. You can find more info about..

How to use HTML Agility pack

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

xmlString ParseErrors is an ArrayList containing any errors from the Load statement if htmlDoc.ParseErrors null htmlDoc.ParseErrors.Count.. null htmlDoc.ParseErrors.Count 0 Handle any parse errors as required else if htmlDoc.DocumentNode null ..

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

This is against my religion so I was wondering if anyone has a better way of doing it c# file io file locking share.. this code for the past several years and I haven't had any issues with it. Understand your hesitation about using exceptions..

Any decent C# profilers out there? [closed]

http://stackoverflow.com/questions/10644/any-decent-c-sharp-profilers-out-there

decent C# profilers out there closed I urgently need a C# profiler... be ideal since it takes time to raise a purchase order. Any recommendations c# .net profiling profiler share improve..

LINQ query on a DataTable

http://stackoverflow.com/questions/10855/linq-query-on-a-datatable

results.Field RowNo 1 select results This is not allowed. Any ideas how to get something like this working I'm amazed that..

Using IoC for Unit Testing

http://stackoverflow.com/questions/1465849/using-ioc-for-unit-testing

to manage mocks in a huge solution 50 projects using IoC Any experiences Any C# libraries that work well for using it in.. in a huge solution 50 projects using IoC Any experiences Any C# libraries that work well for using it in unit tests c# unit..

WPF global exception handler

http://stackoverflow.com/questions/1472498/wpf-global-exception-handler

a messagebox with Sorry for the inconvenience ... Any help would be most welcome thank you. c# .net wpf exception..

Are there any suggestions for developing a C# coding standards / best practices document? [closed]

http://stackoverflow.com/questions/14967/are-there-any-suggestions-for-developing-a-c-sharp-coding-standards-best-pract

code more readable. So here goes .... any suggestions Any at all c# standards procedure share improve this question..

How to stop BackgroundWorker on Form's Closing event?

http://stackoverflow.com/questions/1731384/how-to-stop-backgroundworker-on-forms-closing-event

done than .Invoke ... never returns also understandably. Any ideas how do I close this app without getting the exception..

The located assembly's manifest definition does not match the assembly reference

http://stackoverflow.com/questions/215026/the-located-assemblys-manifest-definition-does-not-match-the-assembly-reference

to Utility version 1.2.0.203 the other one is old . Any suggestions on how I figure out what is trying to reference..

Fixing “The breakpoint will not currently be hit. No symbols have been loaded for this document.”

http://stackoverflow.com/questions/2155930/fixing-the-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-fo

debug info on in exactly the same way in the project file. Any ideas I want to add in here mostly for myself when I come back..

Read/Write 'Extended' file properties (C#)

http://stackoverflow.com/questions/220097/read-write-extended-file-properties-c

Category etc that you can see in Windows explorer. Any ideas how to do this EDIT I'll mainly be reading writing to..

Transactions in .net

http://stackoverflow.com/questions/224689/transactions-in-net

to do some transactions while inserting data into the DB. Any responses or links for even basic stuff about transactions are..

Most efficient way to randomly “sort” (Shuffle) a list of integers in C#

http://stackoverflow.com/questions/375351/most-efficient-way-to-randomly-sort-shuffle-a-list-of-integers-in-c-sharp

of integers 0 1999 in the most efficient way possible. Any ideas Currently I am doing something like this bool bIndexSet..

ASP.NET MVC $.post call returning string…need help with format for jqGrid

http://stackoverflow.com/questions/4101116/asp-net-mvc-post-call-returning-string-need-help-with-format-for-jqgrid

not 100 on that. What is the best way to deal with this Any advice would be greatly appreciated. SOLUTION I solved this..

When to use struct in C#?

http://stackoverflow.com/questions/521298/when-to-use-struct-in-c

to fill 964ms Obviously the big difference is in resizing. Any difference if Dictionary is initialized with the Capacity Not..

Developing Internet Explorer Extensions?

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

lousy documentation lousy code example code lack thereof. Any help resources you could offer would be greatly appreciated...

C# DLL config file

http://stackoverflow.com/questions/594298/c-sharp-dll-config-file

app.config file to my console application it works fine. Any ideas c# app config share improve this question It is not..

How to get object size in memory? [duplicate]

http://stackoverflow.com/questions/605621/how-to-get-object-size-in-memory

c# performance memory share improve this question Any container is a relatively small object that holds a reference..

C# difference between `==` and .Equals()

http://stackoverflow.com/questions/814878/c-sharp-difference-between-and-equals

.Content Energy Attack Execute code Any reason as to why this is happening c# .net equals share improve..

Reliable method to get machine's MAC address in C#

http://stackoverflow.com/questions/850650/reliable-method-to-get-machines-mac-address-in-c-sharp

of the C# commands and OS queries don't work across OS. Any ideas I have been scraping the output of ipconfig all but this..

Observable Collection Property Changed on Item in the Collection

http://stackoverflow.com/questions/1015126/observable-collection-property-changed-on-item-in-the-collection

the list sort how I want. I want to resort the list at ANY point when any property changed on a child element. All my child..

Are static methods thread safe

http://stackoverflow.com/questions/1090650/are-static-methods-thread-safe

safe I have a static timer class which will be called by ANY webpage to calculate how long each page has taken to be constructed...

Dynamically Updating TabControl Content at Runtime

http://stackoverflow.com/questions/15209870/dynamically-updating-tabcontrol-content-at-runtime

see in this example I'm in no way creating or manipulating ANY UI elements in code. This simplifies all code A LOT and helps..

Complex UI inside ListBoxItem

http://stackoverflow.com/questions/15532639/complex-ui-inside-listboxitem

ListBox does the ListView provide the ability to add ANY UI into it can I add Videos for example for each item or a complex.. ListBox does the ListView provide the ability to add ANY UI into it can I add Videos for example for each item or a complex..

UDID for windows 8

http://stackoverflow.com/questions/16893746/udid-for-windows-8

No there is not such ID because in theory you can change ANY hardware component so you may get a completely different ID..

Is there any valid reason to ever ignore a caught exception

http://stackoverflow.com/questions/204814/is-there-any-valid-reason-to-ever-ignore-a-caught-exception

catch block. But my question is Is this EVER acceptable in ANY situation I think not but I've been known to be wrong. c# exception..

multimap in .NET

http://stackoverflow.com/questions/380595/multimap-in-net

SOFTWARE IS PROVIDED BY SOLUTIONS DESIGN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE.. EVENT SHALL SOLUTIONS DESIGN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL.. OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR..

Binding to static class property

http://stackoverflow.com/questions/3862455/binding-to-static-class-property

textblock share improve this question You can bind to ANY property on a static class using the x Static markup extension..

Is there any way to JSON.NET-serialize a subclass of List<T> that also has extra properties?

http://stackoverflow.com/questions/5863496/is-there-any-way-to-json-net-serialize-a-subclass-of-listt-that-also-has-extra

by using the above format we should be able to serialize ANY subclass of List or its derivatives similar objects provided..

Is LinqToSQL powerful enough? Isn't a more powerful but equally fluent interface easy to construct?

http://stackoverflow.com/questions/640004/is-linqtosql-powerful-enough-isnt-a-more-powerful-but-equally-fluent-interface

above seems outrageously simple to me and it can handle ANY SQL construct using the knowledge of SQL I already have. I did..

Options for using System.Data.SQLite in a 32bit and 64bit C# world

http://stackoverflow.com/questions/7264383/options-for-using-system-data-sqlite-in-a-32bit-and-64bit-c-sharp-world

that compiles x64 and uses 64bit SQLite. It prevents using ANY as a compile option and being able to easily deploy a single.. if there is way to get a single C# DLL that can compile to ANY so it can take advantage of 32 or 64 bit depending on where..

Can sql server queries be really cancelled/killed?

http://stackoverflow.com/questions/7837739/can-sql-server-queries-be-really-cancelled-killed

Which cryptographic hash function should I choose?

http://stackoverflow.com/questions/800685/which-cryptographic-hash-function-should-i-choose

no third party has any malicious intent would you expect ANY collisions meaning two arbitrary byte producing the same hash..

Programmatically determine user who last modified file on Windows?

http://stackoverflow.com/questions/8406720/programmatically-determine-user-who-last-modified-file-on-windows

doesn't have to be with FileSystemWatcher I'm looking for ANY way to do this. c# windows network drive share improve this..

MVC Custom Authentication, Authorization, and Roles Implementation

http://stackoverflow.com/questions/8567358/mvc-custom-authentication-authorization-and-roles-implementation

userRoles.HasFlag Roles.Administrator Checks if user has ANY of the allowed role flags. public bool IsUserInAnyRoles Roles..