¡@

Home 

c# Programming Glossary: re

What are the pros and cons to keeping SQL in Stored Procs versus Code

http://stackoverflow.com/questions/15142/what-are-the-pros-and-cons-to-keeping-sql-in-stored-procs-versus-code

are the pros and cons to keeping SQL in Stored Procs versus Code.. are the pros and cons to keeping SQL in Stored Procs versus Code What are the advantages disadvantages of.. and cons to keeping SQL in Stored Procs versus Code What are the advantages disadvantages of keeping SQL in your C# source..

Volatile vs. Interlocked vs. lock

http://stackoverflow.com/questions/154551/volatile-vs-interlocked-vs-lock

a public int counter field that is accessed by multiple threads. This int is only incremented or decremented. To increment.. that is accessed by multiple threads. This int is only incremented or decremented. To increment this field which approach.. by multiple threads. This int is only incremented or decremented. To increment this field which approach should be used..

switch / pattern matching idea

http://stackoverflow.com/questions/156467/switch-pattern-matching-idea

pattern matching idea I've been looking at F# recently and while I'm not likely to leap the fence any time soon.. the fence any time soon it definitely highlights some areas where C# or library support could make life easier. In particular.. fence any time soon it definitely highlights some areas where C# or library support could make life easier. In particular..

TransactionScope automatically escalating to MSDTC on some machines?

http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines

escalating to MSDTC on some machines In our project we're using TransactionScope's to ensure our data access layer performs.. In our project we're using TransactionScope's to ensure our data access layer performs it's actions in a transaction... access layer performs it's actions in a transaction. We're aiming to not require the MSDTC service to be enabled on our..

What is the proper way to re-throw an exception in C#? [duplicate]

http://stackoverflow.com/questions/178456/what-is-the-proper-way-to-re-throw-an-exception-in-c

is the proper way to re throw an exception in C# duplicate This question already has.. to re throw an exception in C# duplicate This question already has an answer here Throwing Exceptions best practices .. in C# duplicate This question already has an answer here Throwing Exceptions best practices 10 answers I have..

Preserving order with LINQ

http://stackoverflow.com/questions/204505/preserving-order-with-linq

order with LINQ I use LINQ to Objects instructions on.. with LINQ I use LINQ to Objects instructions on an ordered array. Which operations shouldn't I do to be sure the order.. an ordered array. Which operations shouldn't I do to be sure the order of the array is not changed c# arrays linq data structures..

Parsing CSV files in C#

http://stackoverflow.com/questions/2081418/parsing-csv-files-in-c-sharp

CSV files in C# Is there a default official recommended way to parse CSV files in C#.. CSV files in C# Is there a default official recommended way to parse CSV files in C# I don't want to roll my.. Also I've seen instances of people using ODBC OLE DB to read CSV via the Text driver and a lot of people discourage this..

Throwing Exceptions best practices

http://stackoverflow.com/questions/22623/throwing-exceptions-best-practices

Exceptions best practices What are the best practices to consider when catching exceptions and.. best practices to consider when catching exceptions and re throwing them I want to make sure that the Exception object's.. catching exceptions and re throwing them I want to make sure that the Exception object's InnerException and stack trace are..

Getting all types that implement an interface with C# 3.0

http://stackoverflow.com/questions/26733/getting-all-types-that-implement-an-interface-with-c-sharp-3-0

all types that implement an interface with C# 3.0 Using reflection how can I get all types that implement an interface.. code and minimizing iterations This is what I want to re write foreach Type t in this.GetType .Assembly.GetTypes if t.. minimizing iterations This is what I want to re write foreach Type t in this.GetType .Assembly.GetTypes if t is IMyInterface..

What do 'statically linked' and 'dynamically linked' mean?

http://stackoverflow.com/questions/311882/what-do-statically-linked-and-dynamically-linked-mean

'statically linked' and 'dynamically linked' often in reference to code written in C # but I don't know much of anything.. 'statically linked' and 'dynamically linked' often in reference to code written in C # but I don't know much of anything.. C # but I don't know much of anything about either what are they what exactly are they talking about and what are they linking..

Splash Screen waiting until thread finishes

http://stackoverflow.com/questions/392864/splash-screen-waiting-until-thread-finishes

Screen waiting until thread finishes I still have a problem with.. Screen waiting until thread finishes I still have a problem with the splash screen. I.. thread finishes I still have a problem with the splash screen. I don't want to use the property SC.TopMost true . Now my..

.NET String to byte Array C#

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

Can't I simply get what bytes the string has been stored in Why this dependency on encoding c# .net string bytearray.. this dependency on encoding c# .net string bytearray share improve this question Contrary to the answers here you DON'T.. share improve this question Contrary to the answers here you DON'T need to worry about encoding Like you mentioned your..

Convert generic List/Enumerable to DataTable?

http://stackoverflow.com/questions/564366/convert-generic-list-enumerable-to-datatable

List Enumerable to DataTable I have few methods that returns different Generic Lists. Exists in .net any class static.. to DataTable I have few methods that returns different Generic Lists. Exists in .net any class static method or whatever.. Regards. Josema. c# list generics datatable poco share improve this question Here's a nice 2013 update using FastMember..

Change default app.config at runtime

http://stackoverflow.com/questions/6150644/change-default-app-config-at-runtime

app.config e.g. WCF configuration . Because the modules are loaded dynamically I don't want to have these entries in the.. my application. What I would like to do is the following Create a new app.config in memory that incorporates the config sections.. to overwrite the default app.config It should work transparently so that for example ConfigurationManager.AppSettings uses..

Entity Framework - Using Transactions or SaveChanges(false) and AcceptAllChanges()?

http://stackoverflow.com/questions/815586/entity-framework-using-transactions-or-savechangesfalse-and-acceptallchanges

investigating transactions and it appears that they take care of themselves in EF as long as I pass false to SaveChanges and.. false to SaveChanges and then call AcceptAllChanges if there are no errors SaveChanges false ... AcceptAllChanges What if.. to SaveChanges and then call AcceptAllChanges if there are no errors SaveChanges false ... AcceptAllChanges What if something..

Why catch and rethrow Exception in C#?

http://stackoverflow.com/questions/881473/why-catch-and-rethrow-exception-in-c

catch and rethrow Exception in C# Folks forgive me I'm pretty much a raw.. catch and rethrow Exception in C# Folks forgive me I'm pretty much a raw prawn when it comes to C# and .NET generally..... sWriter new StringWriter xmlSer.Serialize sWriter dto return sWriter.ToString catch Exception ex throw ex The rest of..

C# How to find if an event is hooked up

http://stackoverflow.com/questions/1129517/c-sharp-how-to-find-if-an-event-is-hooked-up

hook an event up myObject.SomeEvent m_myEventHandler Re check p2 number of events hooked up to myEventHandler int p2..

C#: Order of function evaluation (vs C)

http://stackoverflow.com/questions/1215236/c-order-of-function-evaluation-vs-c

blogs.msdn.com oldnewthing archive 2007 08 14 4374222.aspx Re C order Apparently this is because the compiler can't guarantee..

Generics - where T is a number?

http://stackoverflow.com/questions/1267902/generics-where-t-is-a-number

x ... y ... dynamic result x y does what you expect Re the comment about you don't actually need operators for this..

How to make designer generated .Net application settings portable

http://stackoverflow.com/questions/1382617/how-to-make-designer-generated-net-application-settings-portable

a few minor changes I have done so in my project StreamRecorder.NET with success. Some comments on the project's page.. version.aspx http www.codeproject.com Messages 3285411 Re Win Form Designer breaking with custom Settings.aspx And the.. Application.SetCompatibleTextRenderingDefault false Application.Run new MainForm args private..

ServiceStack Request DTO design

http://stackoverflow.com/questions/15927475/servicestack-request-dto-design

Request DTO design I am a .Net developer used to develop web application.. GET Authenticate public class GetBookingLimit IReturn GetBookingLimitResponse public int Id get set public class.. public class GetBookingLimit IReturn GetBookingLimitResponse public int Id get set public class GetBookingLimitResponse..

TransactionScope automatically escalating to MSDTC on some machines?

http://stackoverflow.com/questions/1690892/transactionscope-automatically-escalating-to-msdtc-on-some-machines

prep the command connection.Open using SqlDataReader reader command.ExecuteReader use the reader connection.Close.. connection.Open using SqlDataReader reader command.ExecuteReader use the reader connection.Close Do other stuff here that.. it to not support single phase notifications Update 2 Re investigated personally everyone's SQL Server versions Dev 3..

Why won't control update/refresh mid-process

http://stackoverflow.com/questions/2341731/why-wont-control-update-refresh-mid-process

text statusStrip1.Invalidate statusStrip1.Refresh statusStrip1.Update When I run the code once the process.. string text StatusLabel1.Text text statusStrip1.Refresh Application.DoEvents So I guess the processing is taking.. I've been known to do it . Edit Update based on your edits Re So I guess the processing is taking place on the UI thread but..

Access to Modified Closure (2)

http://stackoverflow.com/questions/304258/access-to-modified-closure-2

V v V T e.Current embedded statement finally Dispose e Re unsubscribing if you actively want to unsubscribe an anonymous..

Re-entrant locks in C#

http://stackoverflow.com/questions/391913/re-entrant-locks-in-c-sharp

entrant locks in C# Will the following code result in a deadlock..

Convert DateTime to Julian Date in C# (ToOADate Safe?)

http://stackoverflow.com/questions/5248827/convert-datetime-to-julian-date-in-c-sharp-tooadate-safe

an understanding of the magic numbers being used. Thanks References DateTime.ToOADate Method c# .net datetime date julian.. of 1s and 0s by doing that division in integer space. Re written to floating point it would be int 30.6 Month 91.4 ...

How delegates work (in the background)?

http://stackoverflow.com/questions/527489/how-delegates-work-in-the-background

object c# delegates share improve this question Re efficiency it isn't clear what you mean but they can be used.. or typical TypeConverter usage using System using System.Reflection static class Program formatted for space static void..

Linq-to-Sql: recursively get children

http://stackoverflow.com/questions/535436/linq-to-sql-recursively-get-children

result in an infinite loop. public IEnumerable Comment GetReplies int commentID var db new DataClassesDataContext var replies.. CommentID yield return reply yield return GetReplies reply.CommentID type mis match. foreach Comment replyReply.. reply.CommentID type mis match. foreach Comment replyReply in GetReplies reply.CommentID yield return replyReply 2..

protobuf-net inheritance

http://stackoverflow.com/questions/6247513/protobuf-net-inheritance

as it includes some emit code to generate methods. Re using it will be faster and require less memory. The type model..

Why are public fields faster than properties?

http://stackoverflow.com/questions/632831/why-are-public-fields-faster-than-properties

being callvirt in the IL. So am I going insane EDIT 4 Reed Copsey posted the answer in a comment below Re Edit3 see my.. EDIT 4 Reed Copsey posted the answer in a comment below Re Edit3 see my updated comment I believe this is x86 JIT vs x64.. as more 64 bit systems are coming online every day. Reed Copsey And my response to his answer Thanks this is the answer..

How do I create a delegate for a .NET property?

http://stackoverflow.com/questions/724143/how-do-i-create-a-delegate-for-a-net-property

to create a delegate as a test for Public Overridable ReadOnly Property PropertyName As String My intuitive attempt was.. But this throws the error Method 'Public Overridable ReadOnly Property PropertyName As String' does not have a signature.. c# vb.net delegates share improve this question Re the problem using AddressOf if you know the prop name at compile..

How do I detect that an object is a generic collection, and what types it contains?

http://stackoverflow.com/questions/755200/how-do-i-detect-that-an-object-is-a-generic-collection-and-what-types-it-contai

c# generics typechecking share improve this question Re your conundrum I'm assuming stringifyList is a generic method..

Why are structs stored on the stack while classes get stored on the heap(.NET)?

http://stackoverflow.com/questions/815354/why-are-structs-stored-on-the-stack-while-classes-get-stored-on-the-heap-net

variables. But that is an implementation detail. end edit Re the whole value types go on the stack thing... value types don't..

Convert DataTable to CSV stream

http://stackoverflow.com/questions/888181/convert-datatable-to-csv-stream

If I know the columns I just create the class DelimitedRecord public class MailMergeFields FieldQuoted public string FirstName.. new StringWriter engine.WriteStream writer merge context.Response.Write writer.ToString Unfortunately as I don't know the.. MemoryStream stream new MemoryStream bytes StreamReader reader new StreamReader stream Console.WriteLine reader.ReadToEnd..

SpinWait vs Sleep waiting. Which one to use?

http://stackoverflow.com/questions/9719003/spinwait-vs-sleep-waiting-which-one-to-use

one maybe SpinWait for say 20ms and use Sleep for the rest Re the comment here's how I'd hook an is it full mechanism private..