¡@

Home 

c# Programming Glossary: se

How to config socket connect timeout in C#

http://stackoverflow.com/questions/1062035/how-to-config-socket-connect-timeout-in-c-sharp

a disconnected IP address there is a long timeout over 15 seconds... How can we reduce this timeout What is the method to.. What is the method to config it The code I'm using to set up a socket connection is as following try m_clientSocket new.. ProtocolType.Tcp IPAddress ip IPAddress.Parse serverIp int iPortNo System.Convert.ToInt16 serverPort IPEndPoint..

Best Practices of Test Driven Development Using C# and RhinoMocks [closed]

http://stackoverflow.com/questions/124210/best-practices-of-test-driven-development-using-c-sharp-and-rhinomocks

of Test Driven Development Using C# and RhinoMocks closed In order to help my team write testable code I came up with.. simple list of best practices for making our C# code base more testable. Some of the points refer to limitations of Rhino.. they follow To maximize the testability of code follow these rules Write the test first then the code. Reason This ensures..

Mobile Device Detection in asp.net

http://stackoverflow.com/questions/13086856/mobile-device-detection-in-asp-net

following is a Mobile device detection code which encompasses three different conditions if Request.Browser.IsMobileDevice.. encompasses three different conditions if Request.Browser.IsMobileDevice Do Something else if System.Web.Configuration.HttpCapabilitiesBase.. if Request.Browser.IsMobileDevice Do Something else if System.Web.Configuration.HttpCapabilitiesBase myBrowserCaps..

Password encryption/ decryption code in .NET

http://stackoverflow.com/questions/1678555/password-encryption-decryption-code-in-net

C#. how to save the password in encrypted format in database and retrieve as original format by decryption kindly anyone.. a given password and returns the encrypted data as a base64 string. summary param name plainText An unencrypted string.. name plainText An unencrypted string that needs to be secured. param returns A base64 encoded string that represents..

What are regular expression Balancing Groups?

http://stackoverflow.com/questions/17003799/what-are-regular-expression-balancing-groups

groups. I'm still not quite sure what they are and how to use them. I read through Balancing Group Definition but the explanation.. the explanation is hard to follow and I'm still quite confused on the questions that I mentioned. Could someone simply explain.. simply explain what balancing groups are and how they are useful c# .net regex balancing groups share improve this question..

.NET code to send ZPL to Zebra printers

http://stackoverflow.com/questions/2044676/net-code-to-send-zpl-to-zebra-printers

code to send ZPL to Zebra printers Is there a way to send ZPL Zebra Programming.. code to send ZPL to Zebra printers Is there a way to send ZPL Zebra Programming Language to a printer in .NET I have.. IntPtr hTemplateFile private void Print Command to be sent to the printer string command ^XA^FO10 10 ^AO 30 20^FDFDTesting^FS^FO10..

How to write Asynchronous LINQ query?

http://stackoverflow.com/questions/252355/how-to-write-asynchronous-linq-query

introduce how to write asynchronous LINQ query. Suppose we use LINQ to SQL below statement is clear. However if the.. how to write asynchronous LINQ query. Suppose we use LINQ to SQL below statement is clear. However if the SQL database.. to SQL below statement is clear. However if the SQL database responds slowly then the thread using this block of code would..

Why we need Thread.MemoryBarrier()?

http://stackoverflow.com/questions/3556351/why-we-need-thread-memorybarrier

Task.Factory.StartNew obj.B Thread.Sleep 10 This need seems crazy to me. How can I recognize all possible cases that.. need seems crazy to me. How can I recognize all possible cases that this can occur I think that if processor changes order.. that the behavior doesn't change. Do you bother to use Barriers c# .net multithreading thread safety memory barriers..

How to get a delegate object from an EventInfo?

http://stackoverflow.com/questions/3783267/how-to-get-a-delegate-object-from-an-eventinfo

with the current type not the current instance per se. So the EventInfo object doesn't contain information about the.. subscribedDelegate in eventFieldValue.GetInvocationList select subscribedDelegate.Method So now your calling code can.. h Console.WriteLine h.Name static void MyHandler object sender EventArgs e throw new NotImplementedException The output..

.NET assembly runs in partial trust on a network drive, but all other in full trust

http://stackoverflow.com/questions/4827670/net-assembly-runs-in-partial-trust-on-a-network-drive-but-all-other-in-full-tr

assembly runs in partial trust on a network drive but all other in.. a strange issue with our C solution which calls .NET 4.0 assemblies when running on a network drive. The solution hosts several.. when running on a network drive. The solution hosts several WCF services with NetTcpBinding one of them with a non..

How should anonymous types be used in C#?

http://stackoverflow.com/questions/48668/how-should-anonymous-types-be-used-in-c

should anonymous types be used in C# I've seen lots of descriptions how anonymous types work.. should anonymous types be used in C# I've seen lots of descriptions how anonymous types work but I'm not.. anonymous types work but I'm not sure how they're really useful. What are some scenarios that anonymous types can be used..

C# Async Sockets Server Receive Problems

http://stackoverflow.com/questions/5934469/c-sharp-async-sockets-server-receive-problems

fine until a client performas two or more synchronous send operation without waiting some time. The client does not get.. does not get any error and so is not notified that the server does not get the second message If the client waits approx... and so is not notified that the server does not get the second message If the client waits approx. 100ms after the first..

WPF MVVM Modal Overlay Dialog only over a View (not Window)

http://stackoverflow.com/questions/6351612/wpf-mvvm-modal-overlay-dialog-only-over-a-view-not-window

to find a suitable control already written for such a purpose but had no luck so I reused parts of XAML from another similar.. already written for such a purpose but had no luck so I reused parts of XAML from another similar control and got make my.. my own. What I want to achieve is Have a reusable View usercontrol viewmodel to bind to to be able to use inside other..

How can I tell if the connection has been broken in my sockets based client?

http://stackoverflow.com/questions/681866/how-can-i-tell-if-the-connection-has-been-broken-in-my-sockets-based-client

I tell if the connection has been broken in my sockets based client If my client's connection is broken on the other end.. my client's connection is broken on the other end kill 9 server . It takes several minutes for the client to determine that.. is broken on the other end kill 9 server . It takes several minutes for the client to determine that something is wrong...

Copy file to remote computer using remote admin credentials

http://stackoverflow.com/questions/766033/copy-file-to-remote-computer-using-remote-admin-credentials

credentials I am using C#... I need the ability to copy a set of files to about 500 unique computers. I have successfully.. 500 unique computers. I have successfully been able to use the LogonUser method to impersonate a domain account that has.. computers. I have successfully been able to use the LogonUser method to impersonate a domain account that has the required..

Entity Framework 4.2 : Getting proper database errors

http://stackoverflow.com/questions/8645233/entity-framework-4-2-getting-proper-database-errors

Framework 4.2 Getting proper database errors In my ASP.NET MVC 3 application I use EF 4.2. In my.. proper database errors In my ASP.NET MVC 3 application I use EF 4.2. In my database I have a unique constraint for a column... In my ASP.NET MVC 3 application I use EF 4.2. In my database I have a unique constraint for a column. I try to insert same..

What is the return type of a constructor in C#?

http://stackoverflow.com/questions/8893959/what-is-the-return-type-of-a-constructor-in-c

question According to the C# 4.0 Language Specification section 1.6 Instances of classes are created using the new operator.. C# 4.0 Language Specification section 1.6 Instances of classes are created using the new operator which allocates memory for.. to the instance. This mechanism is also explained in section 7.6.10.1 The run time processing of an object creation..