¡@

Home 

c# Programming Glossary: reuse

Writing C# Plugin System

http://stackoverflow.com/questions/1070787/writing-c-sharp-plugin-system

MEF is a new library in .NET that enables greater reuse of applications and components. Using MEF .NET applications..

Is it better to return null or empty collection?

http://stackoverflow.com/questions/1969993/is-it-better-to-return-null-or-empty-collection

last case is special. If callers of your API expect to reuse i.e. use it fully this collection then they would expect a new..

Access random item in list

http://stackoverflow.com/questions/2019417/access-random-item-in-list

instance each time you need a random number. You should reuse the old instance to achieve uniformity in the generated numbers...

Does using “new” on a strict allocate it on the heap or stack?

http://stackoverflow.com/questions/203695/does-using-new-on-a-strict-allocate-it-on-the-heap-or-stack

only allocated once and then the same storage location is reused. EDIT Just to be clear this is only true in some cases... in.. an exception which is why the C# compiler is able to reuse the same stack slot. See Eric Lippert's blog post on value type..

Performance of calling delegates vs methods

http://stackoverflow.com/questions/2082735/performance-of-calling-delegates-vs-methods

outside the loop create a single delegate instance and reuse it. For example Func int int del myInstance.MyMethod for int..

When to Use Static Classes in C#

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

a singleton wrapper of your class that allows for easy reuse although this does make the requirement that your class is stateless...

Do you use curly braces for additional scoping? [closed]

http://stackoverflow.com/questions/249009/do-you-use-curly-braces-for-additional-scoping

but in the same bigger scope Or is it a better practise to reuse the same variable if you want to use the same variable name..

ReSharper conventions for names of event handlers

http://stackoverflow.com/questions/2994774/resharper-conventions-for-names-of-event-handlers

name say what it does not what calls it. That promotes reuse as well. Admittedly the signature of an event handler is often.. the signature of an event handler is often not ideal for reuse I'd argue that often a lambda expression calling a method with..

Launch a URL in a tab in an existing IE window from C#

http://stackoverflow.com/questions/3713206/launch-a-url-in-a-tab-in-an-existing-ie-window-from-c-sharp

pi new ProcessStartInfo url Process.Start pi How to i reuse an existing IE windows when IE is NOT the default browser c#..

Compare using Thread.Sleep and Timer for delayed execution

http://stackoverflow.com/questions/391621/compare-using-thread-sleep-and-timer-for-delayed-execution

as the article you reference points out since it will just reuse threads in the pool and if you will have more than one timer..

Should we select VB.NET or C# when upgrading our legacy applications? [closed]

http://stackoverflow.com/questions/507291/should-we-select-vb-net-or-c-sharp-when-upgrading-our-legacy-applications

have a lot of duplicated code shared among them copy paste reuse we want to rewrite it in a way that emphasizes reusability testability..

If strings are immutable in .NET, then why does Substring take O(n) time?

http://stackoverflow.com/questions/6742923/if-strings-are-immutable-in-net-then-why-does-substring-take-on-time

place. So using a persistent strategy that encourages reuse of most of the memory is also not a win all you've done is made..

Best Way to Invoke Any Cross-Threaded Code?

http://stackoverflow.com/questions/711408/best-way-to-invoke-any-cross-threaded-code

to streamline the creation of safe cross threaded code. reuse this code in any situation no Windows Forms references . Here's..

How to protect dlls?

http://stackoverflow.com/questions/805461/how-to-protect-dlls

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

http://stackoverflow.com/questions/8602395/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation

You may be better off by forcing SQL Server not to reuse a previous query plan. See this answer for details on how to..

Is there a reason for C#'s reuse of the variable in a foreach?

http://stackoverflow.com/questions/8898925/is-there-a-reason-for-cs-reuse-of-the-variable-in-a-foreach

there a reason for C#'s reuse of the variable in a foreach When using lambda expressions..

Why Interface Layer/Abstract classes required in our project? [closed]

http://stackoverflow.com/questions/9702032/why-interface-layer-abstract-classes-required-in-our-project

to some embeded database sqlite . But one day you need to reuse your library in some enterprise context. So now you need to..

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

the connection is returned to the pool it is ready to be reused on the next Open call. So obviously there's no reason to avoid.. for the connection pool to know when a connection can be reused or not. But it's a very important flag because if a connection.. an open and available Connection . Conclusion Don't reuse connections or any ADO.NET objects at all. Don't make them static..

Best approach for designing F# libraries for use from both F# and C#

http://stackoverflow.com/questions/10110174/best-approach-for-designing-f-libraries-for-use-from-both-f-and-c-sharp

F# project call if FooBarCs and compile it into FooFar.dll Reuse the first F# project at the source level. Create .fsi file which..

Sometimes adding a WCF Service Reference generates an empty reference.cs

http://stackoverflow.com/questions/1408509/sometimes-adding-a-wcf-service-reference-generates-an-empty-reference-cs

on your service reference and click configure and uncheck Reuse Types in Referenced Assemblies it'll likely resolve the issue...

WCF: VS2010 confuses System.Xml.XmlElement with System.Xml.Linq.XElement?

http://stackoverflow.com/questions/2855597/wcf-vs2010-confuses-system-xml-xmlelement-with-system-xml-linq-xelement

this at the bottom you will see 2 radio buttons that say Reuse types in all referenced assemblies or Reuse types in specified.. that say Reuse types in all referenced assemblies or Reuse types in specified referenced assemblies . Click on the 2nd..

WCF Service Reference generates its own contract interface, won't reuse mine

http://stackoverflow.com/questions/3119329/wcf-service-reference-generates-its-own-contract-interface-wont-reuse-mine

time but there should be better way... edit I do have 'Reuse types in referenced assemblies' and 'Reuse types in all referenced.. edit I do have 'Reuse types in referenced assemblies' and 'Reuse types in all referenced assemblies' options selected for both.. wcf reference reusability share improve this question Reuse types in referenced assemblies only allows you to reuse Data..

Service Reference Error: Failed to generate code for the service reference

http://stackoverflow.com/questions/3977560/service-reference-error-failed-to-generate-code-for-the-service-reference

share improve this question Have to uncheck the Reuse types in all referenced assemblies from Configure service reference..

Reuse asynchronous socket: subsequent connect attempts fail

http://stackoverflow.com/questions/5762276/reuse-asynchronous-socket-subsequent-connect-attempts-fail

asynchronous socket subsequent connect attempts fail I'm trying..