c# Programming Glossary: system
How to use localization in C# http://stackoverflow.com/questions/1142802/how-to-use-localization-in-c-sharp Console.WriteLine strings.Hello What happens is that the system will look for a resource for fr FR . It will not find one since..
C# - Convert UTC/GMT time to local time http://stackoverflow.com/questions/179940/c-sharp-convert-utc-gmt-time-to-local-time will equal DateTimeKind.Utc Now once the system knows its in UTC time you can just call ToLocalTime DateTime..
.NET Process Monitor http://stackoverflow.com/questions/1986249/net-process-monitor processName serverName c# process system share improve this question WMI provides a way to track processes..
FileSystemWatcher vs polling to watch for file changes http://stackoverflow.com/questions/239988/filesystemwatcher-vs-polling-to-watch-for-file-changes reliability etc. are there with either method c# filesystemwatcher share improve this question I have seen the file system.. share improve this question I have seen the file system watcher fail in production and test environments. I now consider.. My pattern has been to watch for changes with the files system watcher but poll occasionally to catch missing file changes...
When to Use Static Classes in C# http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp services that just did their job and nothing else. As a system grows however dragons be coming. Polymorphism Say we have the.. ideally each class should have a single purpose within the system. I'd much rather have a five times the classes as long as their..
How to fix the flickering in User controls http://stackoverflow.com/questions/2612487/how-to-fix-the-flickering-in-user-controls
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 permissions will force an additional trip out the file system. In summary an initial check before trying to open the file..
How to detect Windows 64-bit platform with .NET? http://stackoverflow.com/questions/336633/how-to-detect-windows-64-bit-platform-with-net I use the following code to detect the operating system platform string os_platform System.Environment.OSVersion.Platform.ToString..
Best practices for exception management in Java or C# http://stackoverflow.com/questions/409563/best-practices-for-exception-management-in-java-or-c-sharp but not bubble them up or formally notifying the system either via a log or a notification to the user What best practices.. be consistent in how they manage exceptions within a system. Additionally watch out for code rot via excessive try catches.. giving a exception its respect an exception is warning the system what else needs to be warned . Also this is a pretty choice..
How can I create a Product Key for my C# App http://stackoverflow.com/questions/453030/how-can-i-create-a-product-key-for-my-c-sharp-app schemes for this thinking that if they develop their own system for it then it will be known only to them and therefore 'more..
C#: Static readonly vs const http://stackoverflow.com/questions/755685/c-static-readonly-vs-const constant values. Used for various things around in our system. So I am wondering if my observation is correct Should these..
Using C#, how does one figure out what process locked a file? http://stackoverflow.com/questions/860656/using-c-how-does-one-figure-out-what-process-locked-a-file process in processListSnapshot if process.Id 4 continue system processes var files GetFilesLockedBy process if files.Contains.. string GetFilePath Win32API.SYSTEM_HANDLE_INFORMATION systemHandleInformation Process process var ipProcessHwnd Win32API.OpenProcess.. ipTemp ipHandle if Win32API.DuplicateHandle ipProcessHwnd systemHandleInformation.Handle Win32API.GetCurrentProcess out ipHandle..
Get installed applications in a system http://stackoverflow.com/questions/908850/get-installed-applications-in-a-system installed applications in a system How to get the applications installed in the system using c#.. in a system How to get the applications installed in the system using c# code c# .net installer installation share improve..
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 an icon tool tip and right click menu. c# .net winforms system tray share improve this question The basic answer of using.. address any of these Does closing the application from the system tray properly close any open child forms Does the application..
Parse JSON in C# http://stackoverflow.com/questions/1212344/parse-json-in-c-sharp are working fine. Thank you again Dreas Grech using System using System.Data using System.Configuration using System.Web.. fine. Thank you again Dreas Grech using System using System.Data using System.Configuration using System.Web using System.Web.Security.. you again Dreas Grech using System using System.Data using System.Configuration using System.Web using System.Web.Security using..
Should Usings be inside or outside the namespace http://stackoverflow.com/questions/125319/should-usings-be-inside-or-outside-the-namespace you have the following code in File1.cs File1.cs using System namespace Outer.Inner class Foo static void Bar double d Math.PI.. outside the namespace so it finds Outer.Math instead of System.Math . Unfortunately or perhaps fortunately Outer.Math has no.. as follows File1b.cs namespace Outer.Inner using System class Foo static void Bar double d Math.PI Now the compiler..
Simple 2 way encryption for C# http://stackoverflow.com/questions/165808/simple-2-way-encryption-for-c-sharp or more secure once you have this class in place. using System using System.Data using System.Security.Cryptography using System.IO.. once you have this class in place. using System using System.Data using System.Security.Cryptography using System.IO public.. this class in place. using System using System.Data using System.Security.Cryptography using System.IO public class SimpleAES..
When to Use Static Classes in C# http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp way such as the methods of the Math class in the System namespace. To me that example doesn't seem to cover very many.. any risk to bloat are excellent cases for static methods System.Convert as an example. If your project is a one off with no..
Windows service and timer http://stackoverflow.com/questions/246697/windows-service-and-timer of time. The question is which timer control should I use System.Timers.Timer or System.Threading.Timer one Does it influence.. is which timer control should I use System.Timers.Timer or System.Threading.Timer one Does it influence on something I am asking.. because I heard many evidences to non correct work of System.Timers.Timer in windows services. Thank you. c# windows services..
Getting key of value of a generic Dictionary? http://stackoverflow.com/questions/255341/getting-key-of-value-of-a-generic-dictionary Okay here's the multiple bidirectional version using System using System.Collections.Generic using System.Text class BiDictionary.. the multiple bidirectional version using System using System.Collections.Generic using System.Text class BiDictionary TFirst.. using System using System.Collections.Generic using System.Text class BiDictionary TFirst TSecond IDictionary TFirst IList..
Randomize a List<T> in C# http://stackoverflow.com/questions/273313/randomize-a-listt-in-c-sharp products.Shuffle The code above uses the much criticised System.Random method to select swap candidates. It's fast but not as.. in your shuffles use the random number generator in System.Security.Cryptography like so using System.Security.Cryptography.. generator in System.Security.Cryptography like so using System.Security.Cryptography ... public static void Shuffle T this..
Using AES encryption in C# http://stackoverflow.com/questions/273452/using-aes-encryption-in-c-sharp in a hurry here it is in all its plagiarized glory using System using System.IO using System.Security.Cryptography namespace.. here it is in all its plagiarized glory using System using System.IO using System.Security.Cryptography namespace RijndaelManaged_Example.. its plagiarized glory using System using System.IO using System.Security.Cryptography namespace RijndaelManaged_Example class..
Deserialize JSON into C# dynamic object? http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object coding style. All you need is this code and a reference to System.Web.Extensions from your project using System using System.Collections.. reference to System.Web.Extensions from your project using System using System.Collections using System.Collections.Generic using.. System.Web.Extensions from your project using System using System.Collections using System.Collections.Generic using System.Collections.ObjectModel..
Dynamic LINQ OrderBy on IEnumerable<T> http://stackoverflow.com/questions/41244/dynamic-linq-orderby-on-ienumerablet semantics using Microsoft.CSharp.RuntimeBinder using System using System.Collections using System.Collections.Generic using.. using Microsoft.CSharp.RuntimeBinder using System using System.Collections using System.Collections.Generic using System.Dynamic.. using System using System.Collections using System.Collections.Generic using System.Dynamic using System.Linq using..
Casting vs using the 'as' keyword in the CLR http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr check with modern JITs as shown by the code below using System using System.Diagnostics using System.Linq class Test const.. modern JITs as shown by the code below using System using System.Diagnostics using System.Linq class Test const int Size 30000000.. the code below using System using System.Diagnostics using System.Linq class Test const int Size 30000000 static void Main object..
Convert generic List/Enumerable to DataTable? http://stackoverflow.com/questions/564366/convert-generic-list-enumerable-to-datatable I doubt you'll improve much on that... code using System using System.Collections.Generic using System.ComponentModel.. you'll improve much on that... code using System using System.Collections.Generic using System.ComponentModel using System.Data.. code using System using System.Collections.Generic using System.ComponentModel using System.Data using System.Diagnostics public..
How do I convert Word files to PDF programmatically? http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically to the solution. using Microsoft.Office.Interop.Word using System using System.Collections.Generic using System.IO using System.Linq.. using Microsoft.Office.Interop.Word using System using System.Collections.Generic using System.IO using System.Linq using.. using System using System.Collections.Generic using System.IO using System.Linq using System.Text ... Create a new Microsoft..
Sending email through Gmail SMTP server with C# http://stackoverflow.com/questions/704636/sending-email-through-gmail-smtp-server-with-c-sharp code works just like the samples you referred to using System using System.Collections.Generic using System.Linq using System.Text.. just like the samples you referred to using System using System.Collections.Generic using System.Linq using System.Text using.. to using System using System.Collections.Generic using System.Linq using System.Text using System.Net.Mail using System.Net..
Deep cloning objects in C# http://stackoverflow.com/questions/78536/deep-cloning-objects-in-c-sharp it does require your objects to be serializable. using System using System.IO using System.Runtime.Serialization using System.Runtime.Serialization.Formatters.Binary.. your objects to be serializable. using System using System.IO using System.Runtime.Serialization using System.Runtime.Serialization.Formatters.Binary.. to be serializable. using System using System.IO using System.Runtime.Serialization using System.Runtime.Serialization.Formatters.Binary..
Is it possible to dynamically compile and execute C# code fragments? http://stackoverflow.com/questions/826398/is-it-possible-to-dynamically-compile-and-execute-c-sharp-code-fragments LukeH's blog which uses some LINQ too just for fun. using System using System.Collections.Generic using System.Linq using Microsoft.CSharp.. which uses some LINQ too just for fun. using System using System.Collections.Generic using System.Linq using Microsoft.CSharp.. fun. using System using System.Collections.Generic using System.Linq using Microsoft.CSharp using System.CodeDom.Compiler class..
Text to Speech in ASP.NET - Access is denied… what to do? http://stackoverflow.com/questions/1022356/text-to-speech-in-asp-net-access-is-denied-what-to-do System and by setting in the machine.config to work as SYSTEM account Of course i feel that as a security issue as i am hosting..
What's the best way to watchdog a desktop application? http://stackoverflow.com/questions/11146381/whats-the-best-way-to-watchdog-a-desktop-application under the local s In substance you have to run programs as SYSTEM but with the SessionID of the current user. If you're feeling..
Screenshot of process under Windows Service http://stackoverflow.com/questions/1445788/screenshot-of-process-under-windows-service this option and your service is running under the default SYSTEM account it won't be able to create a network connection anymore...
How to get friendly device name from DEV_BROADCAST_DEVICEINTERFACE and Device Instance ID http://stackoverflow.com/questions/2208722/how-to-get-friendly-device-name-from-dev-broadcast-deviceinterface-and-device-in Parts 1 string DeviceUniqueID Parts 2 string RegPath @ SYSTEM CurrentControlSet Enum DevType DeviceInstanceId DeviceUniqueID..
How to set a proxy for Webbrowser Control without effecting the SYSTEM/IE proxy http://stackoverflow.com/questions/2499568/how-to-set-a-proxy-for-webbrowser-control-without-effecting-the-system-ie-proxy set a proxy for Webbrowser Control without effecting the SYSTEM IE proxy How can I set a proxy for a Webbrowser Control without..
Ignore DOCTYPE .dtd, but .dtd file must still exist http://stackoverflow.com/questions/3894317/ignore-doctype-dtd-but-dtd-file-must-still-exist 1.0 encoding us ascii standalone no DOCTYPE SomeMessage SYSTEM SomeMessage.dtd SomeMessage data SomeMessage The function that..
Windows Impersonation from C# http://stackoverflow.com/questions/559719/windows-impersonation-from-c-sharp won't be a problem since you're running under NT AUTHORITY SYSTEM. You can then use the created token to impersonate inside a..
In .NET 4.0, how do I 'sandbox' an in-memory assembly and execute a method? http://stackoverflow.com/questions/5997995/in-net-4-0-how-do-i-sandbox-an-in-memory-assembly-and-execute-a-method an AppDomain and load an assembly THAT IS NOT ON THE FILE SYSTEM but rather in RAM. Again the reasons why the other solutions..
Login failed for user 'IIS APPPOOL\ASP.NET v4.0' http://stackoverflow.com/questions/7698286/login-failed-for-user-iis-apppool-asp-net-v4-0 This will make your application run under NT AUTHORITY SYSTEM which is an existing login for the database by default. share..
|