¡@

Home 

c# Programming Glossary: utility

How do you do a deep copy an object in .Net (C# specifically)?

http://stackoverflow.com/questions/129389/how-do-you-do-a-deep-copy-an-object-in-net-c-specifically

a few different approaches to this but I use a generic utility method as such public static T DeepClone T T obj using var ms..

C# cleanest way to write retry logic?

http://stackoverflow.com/questions/1563191/c-sharp-cleanest-way-to-write-retry-logic

new AggregateException exceptions You can now use this utility method to perform retry logic Retry.Do SomeFunctionThatCanFail..

Using StringWriter for XML Serialization

http://stackoverflow.com/questions/1564718/using-stringwriter-for-xml-serialization

reject that as well. Bearing this in mind here are some utility methods for doing the conversion. public static string Serialize..

Method can be made static, but should it?

http://stackoverflow.com/questions/169378/method-can-be-made-static-but-should-it

them static Should I make them static and move them to a utility class c# .net refactoring resharper static methods share.. issue. Utility Class You shouldn't move them to a utility class unless it makes sense in your design. If the static method..

Can I show file copy progress using FileInfo.CopyTo() in .NET?

http://stackoverflow.com/questions/187768/can-i-show-file-copy-progress-using-fileinfo-copyto-in-net

using FileInfo.CopyTo in .NET I've created a copy utility in c# .NET 2.0 Framework that copies files directories and recursive..

Should C# have multiple inheritance? [closed]

http://stackoverflow.com/questions/191691/should-c-sharp-have-multiple-inheritance

there are situations where it is difficult to deny it's utility over interfaces composition and similar OO techniques. Is the..

Best way to copy between two Stream instances

http://stackoverflow.com/questions/230128/best-way-to-copy-between-two-stream-instances

the contents of one stream to another Is there a standard utility method for this c# stream copying share improve this question..

When to Use Static Classes in C#

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

with single method best approach#206481 I used to love utility classes filled up with static methods. They made a great consolidation.. Fosters blobs As static methods are usually used as utility methods and utility methods usually will have different purposes.. As static methods are usually used as utility methods and utility methods usually will have different purposes we'll quickly end..

ShellExecute equivalent in .NET

http://stackoverflow.com/questions/258416/shellexecute-equivalent-in-net

use P Invoke then I might be better just writing my small utility using Win32 anyway. c# .net winapi shell shellexecute share..

PInvoke for C function that returns char *

http://stackoverflow.com/questions/370079/pinvoke-for-c-function-that-returns-char

has already been freed. I tried using a PInvoke code gen utility called P Invoke Interop Assistant . It gave me the output System.Runtime.InteropServices.DLLImportAttribute..

Generate C# class from XML

http://stackoverflow.com/questions/4203540/generate-c-sharp-class-from-xml

xsd test.xml Microsoft R Xml Schemas DataTypes support utility Microsoft R .NET Framework Version 4.0.30319.1 Copyright C Microsoft.. test.xsd classes Microsoft R Xml Schemas DataTypes support utility Microsoft R .NET Framework Version 4.0.30319.1 Copyright C Microsoft..

Requested registry access is not allowed

http://stackoverflow.com/questions/562350/requested-registry-access-is-not-allowed

registry access is not allowed I'm writing a tweak utility that modifies some keys under HKEY_CLASSES_ROOT . All works..

How to build a query string for a URL in C#?

http://stackoverflow.com/questions/829080/how-to-build-a-query-string-for-a-url-in-c

TheValueOfB This is such a common task one would expect a utility class to exist that makes it more elegant and readable. Scanning..

Write file from assembly resource stream to disk

http://stackoverflow.com/questions/864140/write-file-from-assembly-resource-stream-to-disk

at all. Personally I'd start off with a useful utility method public static void CopyStream Stream input Stream output..

Quickest way to convert a base 10 number to any base in .NET?

http://stackoverflow.com/questions/923771/quickest-way-to-convert-a-base-10-number-to-any-base-in-net

to any base so you would have to write your own small utility function. A simple sample would look like that note that this..

The name 'ConfigurationManager' does not exist in the current context

http://stackoverflow.com/questions/1274852/the-name-configurationmanager-does-not-exist-in-the-current-context

using System.Text using System.Configuration namespace Utility public class CommonVariables public static String ConnectionString..

Insert bytes into middle of a file (in windows filesystem) without reading entire file (using File Allocation Table)?

http://stackoverflow.com/questions/13430210/insert-bytes-into-middle-of-a-file-in-windows-filesystem-without-reading-entir

C tools OEMTools nfi nfi c NTFS File Sector Information Utility. Copyright C Microsoft Corporation 1999. All rights reserved...

How to convert HTML to XHTML?

http://stackoverflow.com/questions/138555/how-to-convert-html-to-xhtml

c temp tidy help tidy option... file... option... file... Utility to clean up and pretty print HTML XHTML XML see http tidy.sourceforge.net..

Getting incorrect decryption value using AesCryptoServiceProvider

http://stackoverflow.com/questions/14937707/getting-incorrect-decryption-value-using-aescryptoserviceprovider

inputValue EncryptResult result Aes128Utility.EncryptData byteValForString keyValue EncryptResult encyptedValue.. string finalResult Convert.ToBase64String Aes128Utility.DecryptData encyptedValue keyValue Console.WriteLine finalResult.. else Console.WriteLine Differ Console.ReadLine AES Utility public static class Aes128Utility private static byte key public..

Program Compatibility Assistant thinks my app is an installer

http://stackoverflow.com/questions/1577412/program-compatibility-assistant-thinks-my-app-is-an-installer

e.g. assembly AssemblyProduct Data Installation Utility 'Installer' can also be 'Setup'. It beggars belief it really..

Practical usings of “internal” keyword in C#

http://stackoverflow.com/questions/165719/practical-usings-of-internal-keyword-in-c-sharp

c# access modifiers share improve this question Utility or helper classes methods that you would like to access from..

Simple 2 way encryption for C#

http://stackoverflow.com/questions/165808/simple-2-way-encryption-for-c-sharp

vice versa UTFEncoder new System.Text.UTF8Encoding Two Utility Methods not used but may be useful Generates an encryption..

Method can be made static, but should it?

http://stackoverflow.com/questions/169378/method-can-be-made-static-but-should-it

current object instance represents a correctness issue. Utility Class You shouldn't move them to a utility class unless it makes..

Boiler plate code replacement - is there anything bad about this code?

http://stackoverflow.com/questions/192980/boiler-plate-code-replacement-is-there-anything-bad-about-this-code

I might be missing. from memory static class SafeInvoker Utility to avoid boiler plate InvokeRequired code Usage SafeInvoker.Invoke..

The located assembly's manifest definition does not match the assembly reference

http://stackoverflow.com/questions/215026/the-located-assemblys-manifest-definition-does-not-match-the-assembly-reference

Could not load file or assembly 'Utility Version 1.2.0.200 Culture neutral PublicKeyToken 764d581291d764f7'.. Could not load file or assembly 'Utility Version 1.2.0.203 Culture neutral PublicKeyToken 764d581291d764f7'.. I look in my references and I only have a reference to Utility version 1.2.0.203 the other one is old . Any suggestions on..

How do you correctly update a databound datagridview from a background thread

http://stackoverflow.com/questions/455766/how-do-you-correctly-update-a-databound-datagridview-from-a-background-thread

System.ComponentModel using System.Threading namespace Utility public class ThreadedBindingList T BindingList T SynchronizationContext..

Extension Methods vs Static Utility Class

http://stackoverflow.com/questions/4646328/extension-methods-vs-static-utility-class

Methods vs Static Utility Class I'm looking for some pros and cons for using extension..

Smoothing a hand-drawn curve

http://stackoverflow.com/questions/5525665/smoothing-a-hand-drawn-curve

alpha_l Alpha values left and right alpha_r Vector tmp Utility variable Point bezCurve new Point 4 RETURN bezier curve ctl..

Is OraOLEDB provider in .NET unreliable on CLOB fields?

http://stackoverflow.com/questions/6147274/is-oraoledb-provider-in-net-unreliable-on-clob-fields

10g. If I run the SQL below in the Oracle Web Admin Utility from Toad or if I change the the code below to be OracleConnection..

Why does casting int to invalid enum value NOT throw exception?

http://stackoverflow.com/questions/6413804/why-does-casting-int-to-invalid-enum-value-not-throw-exception

this works so I made a series of utility methods summary Utility methods for enum values. This static type will fail to initialize..