¡@

Home 

c# Programming Glossary: put

How to use localization in C#

http://stackoverflow.com/questions/1142802/how-to-use-localization-in-c-sharp

to. So if a text is the same in France and Canada you can put it in strings.fr.resx while strings that are different in Canadian..

Should Usings be inside or outside the namespace

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

be inside the namespace. Is there a technical reason for putting the using statements inside instead of outside the namespace.. no PI member so File1 is now broken. This changes if you put the using inside your namespace declaration as follows File1b.cs..

Solution for overloaded operator constraint in .NET generics

http://stackoverflow.com/questions/147646/solution-for-overloaded-operator-constraint-in-net-generics

to work then in .NET 3.5 there are some options... I have put together a library here that allows efficient and simple access..

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

block of code from multiple places Amazing You can then put the re usable SQL code inside one of these or if you want to.. world as a black box. Simple things like wanting to put them in source control becomes a nightmare. There's also the..

Complex UI inside ListBoxItem

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

approach with WPF. The best advice I can give is don't put business logic in event handlers. Does winforms support databinding..

Displaying the build date

http://stackoverflow.com/questions/1600962/displaying-the-build-date

Thursday's rather than build 1.0.8.4321. The plan is to put the build date there instead So App built on 21 10 2009 for..

Understanding Garbage Collection in .net

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

is very awkward to debug such a method. Since you may well put the variable in the Watch window or inspect it. And it would..

Creating a byte array from a stream

http://stackoverflow.com/questions/221925/creating-a-byte-array-from-a-stream

is the prefered method for creating a byte array from an input stream Here is my current solution with .NET 3.5. Stream s byte.. idea to read and write chunks of the stream c# .net 3.5 inputstream share improve this question It really depends on whether.. use code like this public static byte ReadFully Stream input byte buffer new byte 16 1024 using MemoryStream ms new MemoryStream..

Best Practice: Initialize class fields in constructor or at declaration?

http://stackoverflow.com/questions/24551/best-practice-initialize-class-fields-in-constructor-or-at-declaration

of the field changes because of a constructor parameter put the initialization in the constructors. 4. Be consistent in..

how can you easily check if access is denied for a file in .NET?

http://stackoverflow.com/questions/265953/how-can-you-easily-check-if-access-is-denied-for-a-file-in-net

the correct thing here is to just try to open the file and put your effort into a good exception handler if it fails. The same..

Is there a better alternative than this to 'switch on type'?

http://stackoverflow.com/questions/298976/is-there-a-better-alternative-than-this-to-switch-on-type

for TypeSwitch is actually pretty small and can easily be put into your project. static class TypeSwitch public class CaseInfo..

How do I find out which process is locking a file using .NET?

http://stackoverflow.com/questions/317071/how-do-i-find-out-which-process-is-locking-a-file-using-net

the win32 API but if anyone has already done this and can put me on the right track I'd really appreciate the help. Update.. is that you can run it as a subprocess and parse the output. We do this in our deployment script works like a charm. share..

Performance differences between debug and release builds

http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds

is pretty reliable code mostly because it has been put to the test millions of times. It is extremely rare to have..

How to read a text file reversely with iterator in C#

http://stackoverflow.com/questions/452902/how-to-read-a-text-file-reversely-with-iterator-in-c-sharp

previousEnd If we didn't decode the start of the array put it at the end for next time if leftOverData 0 Buffer.BlockCopy.. class StreamUtil public static void ReadExactly Stream input byte buffer int bytesToRead int index 0 while index bytesToRead.. int index 0 while index bytesToRead int read input.Read buffer index bytesToRead index if read 0 throw new EndOfStreamException..

Casting vs using the 'as' keyword in the CLR

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

a test and then another attempt to convert the value. To put it another way would anyone ever write int value if int.TryParse..

Use of Application.DoEvents()

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

and start the job again failure modes are solved. Or to put it another way there is no way for the user to make your program..

Random number generator only generating one random number

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

I get different values which is what I want . However if I put a breakpoint two lines below that code all members of the mac..

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

semantics were introduced in C# 2.0 the choice was made to put the loop variable outside the loop consistent with the for loop...

How can I make a .Net Winforms application that only runs in the System Tray?

http://stackoverflow.com/questions/995195/how-can-i-make-a-net-winforms-application-that-only-runs-in-the-system-tray

detail providing a tray application framework that you can put to use immediately plus a complete real world example application..

Most elegant way to generate prime numbers

http://stackoverflow.com/questions/1042902/most-elegant-way-to-generate-prime-numbers

dfa Use LINQ to lazily generate the list of primes Maghis Put lots of primes in a text file and read them in when necessary..

Proper localization of a WinForms application

http://stackoverflow.com/questions/1251225/proper-localization-of-a-winforms-application

all our forms and UI in the default language English. Put all our internal strings in a resource file stuff not tied directly..

Why does “abcd”.StartsWith(“”) return true?

http://stackoverflow.com/questions/145509/why-does-abcd-startswith-return-true

string logically occurs between every pair of characters. Put it this way what definition of starts with could you give that..

IIS WCF service hosting vs Windows Service

http://stackoverflow.com/questions/1560619/iis-wcf-service-hosting-vs-windows-service

Protocols After that you will go in your binding into IIS. Put your binding for http normaly and add a new binding net.tcp..

How to create initializer to create and migrate mysql database?

http://stackoverflow.com/questions/15796115/how-to-create-initializer-to-create-and-migrate-mysql-database

a redundant double check one of the if s should be enough. Put a break there and see exactly what's happening it should not..

Using global keyboard hook (WH_KEYBOARD_LL) in WPF / C#

http://stackoverflow.com/questions/1639331/using-global-keyboard-hook-wh-keyboard-ll-in-wpf-c-sharp

thanks to Mattias S following YourUtils.cs is fixed . Put the following code to some of your utils libs let it be YourUtils.cs..

Sharepoint web services — The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'

http://stackoverflow.com/questions/2608887/sharepoint-web-services-the-http-request-is-unauthorized-with-client-authenti

Studio Right click on References and Add Service Reference Put in the URL to the Lists.asmx service on your server Ex http..

VB.Net equivalent for C# 'dynamic' with Option Strict On

http://stackoverflow.com/questions/2889974/vb-net-equivalent-for-c-sharp-dynamic-with-option-strict-on

Strict Off . With Option Strict On there's no equivalent. Put another way the dynamic keyword brings Option Strict Off equivalent..

Why does C# XmlDocument.LoadXml(string) fail when an XML header is included?

http://stackoverflow.com/questions/310669/why-does-c-sharp-xmldocument-loadxmlstring-fail-when-an-xml-header-is-included

8 byte array byte encodedString Encoding.UTF8.GetBytes xml Put the byte array into a stream and rewind it to the beginning..

x86/x64 CPUID in C#

http://stackoverflow.com/questions/3216535/x86-x64-cpuid-in-c-sharp

buffer. Need to save buffer elsewhere cpuid overwrites rdx Put buffer in r8 use r8 to reference buffer later. Save rdx buffer..

When to use ReleaseComObject vs FinalReleaseComObject? [duplicate]

http://stackoverflow.com/questions/3937181/when-to-use-releasecomobject-vs-finalreleasecomobject

that uses the COM objects explained in this answer . Put it in the calling method instead. share improve this answer..

Convert bitmaps to one multipage TIFF image in .NET 2.0

http://stackoverflow.com/questions/398388/convert-bitmaps-to-one-multipage-tiff-image-in-net-2-0

new MemoryStream bitmap.Save byteStream ImageFormat.Tiff Put Tiff into another Image object Image tiff Image.FromStream byteStream..

System Tray only (no dock icon) application using C# / Mono on Mac

http://stackoverflow.com/questions/4414629/system-tray-only-no-dock-icon-application-using-c-sharp-mono-on-mac

this rules out mono service . The ultimate goal is this Put a tray icon up by the clock for the majority of interactions...

AppFabric caching examples using c# [closed]

http://stackoverflow.com/questions/4739548/appfabric-caching-examples-using-c-sharp

DataTable cachedObject Updating an Item in the Cache Put can be used to update an existing item in the cache If the item.. the item does not exist then it functions like Add myCache.Put myImportantDataKey myUpdatedImportantData That's the basic CRUD..

OneWayToSource Binding seems broken in .NET 4.0

http://stackoverflow.com/questions/4875751/onewaytosource-binding-seems-broken-in-net-4-0

value In .NET 3.5 this works as you might except. Put some text in the TextBox press Tab to make it lose Focus and..

how to replace characters in a array quickly

http://stackoverflow.com/questions/5261858/how-to-replace-characters-in-a-array-quickly

method loops through the array to look for the character. Put the characters in a HashSet char instead private static HashSet..

The provider is not compatible with the version of Oracle client

http://stackoverflow.com/questions/659341/the-provider-is-not-compatible-with-the-version-of-oracle-client

oraocci11.dll ociw32.dll renamed from 'ociw32.dll.dbl' Put all the DLLs in the same folder as your C# Executable share..

Send Email via C# through Google Apps account

http://stackoverflow.com/questions/757987/send-email-via-c-sharp-through-google-apps-account

is no need to hard code all smtp settings in your code. Put them in web.config instead configuration system.net mailSettings..

How to update textbox in form1 from form2?

http://stackoverflow.com/questions/7969582/how-to-update-textbox-in-form1-from-form2

Add a NEW form to the project it will default to Form2 ... Put a single textbox on it and a single button on it. For grins.. close the Form2 designer and code window. Now open Form1. Put a single textbox and a single button on it. The default names..

How to secure an ASP.NET Web API

http://stackoverflow.com/questions/11775594/how-to-secure-an-asp-net-web-api

that request is sent UTC or GMT time HTTP verb GET POST PUT DELETE. post data and query string URL Under the hood HMAC authentication..

“Membership.Provider must be an instance of ExtendedMembershipProvider”

http://stackoverflow.com/questions/12408349/membership-provider-must-be-an-instance-of-extendedmembershipprovider

ISAPI 4.0_32bit path . verb GET HEAD POST DEBUG PUT DELETE PATCH OPTIONS modules IsapiModule scriptProcessor windir.. ISAPI 4.0_64bit path . verb GET HEAD POST DEBUG PUT DELETE PATCH OPTIONS modules IsapiModule scriptProcessor windir.. Integrated 4.0 path . verb GET HEAD POST DEBUG PUT DELETE PATCH OPTIONS type System.Web.Handlers.TransferRequestHandler..

Recommended ServiceStack API Structure

http://stackoverflow.com/questions/15231537/recommended-servicestack-api-structure

get set Alternative way to fetch an Event Route events Id PUT public class UpdateEvent public int Id get set public string..

ServiceStack Request DTO design

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

only use them on operations with side effects e.g. POST PUT as GETs' tend to have minimal validation and throwing a C# Exception..

Restful Login - proper implementation

http://stackoverflow.com/questions/19010067/restful-login-proper-implementation

returned. Given that this needs to be done with a GET POST PUT OR DELETE it seems the GET would be most appropriate. So perhaps.. is not a good idea to send a body in a GET. So a POST or PUT would work but that seems to diverge from the RESTFul philosophy...

C# : Blocking a function call until condition met

http://stackoverflow.com/questions/2213783/c-sharp-blocking-a-function-call-until-condition-met

thread to perform upload .. webClient.UploadFileAsync uri PUT fileNameOnHD And a callback that gets called when the Async.. calling callback when done webClient.UploadFileAsync uri PUT fileNameOnHD _signal.WaitOne wait for the async call to complete..

How to consume REST in C# including PUT, POST and DELETE?

http://stackoverflow.com/questions/2517825/how-to-consume-rest-in-c-sharp-including-put-post-and-delete

to consume REST in C# including PUT POST and DELETE I have a REST webservice that I need to consume.. I need everything that is done by REST including GET PUT POST and DELETE. What is the best way of interfacing with this..

Setting a WebRequest's body data

http://stackoverflow.com/questions/4256136/setting-a-webrequests-body-data

var request HttpWebRequest.Create targetURL request.Method PUT response HttpWebResponse request.GetResponse c# httpwebrequest..

Embedded C# web server?

http://stackoverflow.com/questions/4268814/embedded-c-sharp-web-server

Nancy is designed to handle DELETE GET HEAD OPTIONS POST PUT and PATCH requests Nancy was designed to not have any dependencies..

Uploading files to Sharepoint (WSS 3.0) document library using HTTP PUT

http://stackoverflow.com/questions/596315/uploading-files-to-sharepoint-wss-3-0-document-library-using-http-put

files to Sharepoint WSS 3.0 document library using HTTP PUT Hi I have the following piece of code to upload a file to Sharepoint... piece of code to upload a file to Sharepoint. It uses HTTP PUT public static string UploadFile string destUrl string sourcePath.. WebRequest req WebRequest.Create destUri req.Method PUT req.Headers.Add Overwrite F req.Timeout System.Threading.Timeout.Infinite..

servicestack REST API and CORS

http://stackoverflow.com/questions/8211930/servicestack-rest-api-and-cors

values CorsFeature allowedOrigins allowedMethods GET POST PUT DELETE OPTIONS allowedHeaders Content Type allowCredentials.. Allow Origin Access Control Allow Methods GET POST PUT DELETE OPTIONS Access Control Allow Headers Content Type .. Allow Origin Access Control Allow Methods GET POST PUT DELETE OPTIONS Access Control Allow Headers Content Type ..

What is REST? [duplicate]

http://stackoverflow.com/questions/941016/what-is-rest

to GET content and POST data. But it can also be used to PUT and DELETE data as well as get HEADer information etc. share..