¡@

Home 

c# Programming Glossary: checks

What is the best scripting language to embed in a C# desktop application? [closed]

http://stackoverflow.com/questions/137933/what-is-the-best-scripting-language-to-embed-in-a-c-sharp-desktop-application

the object this shouldn't happen as we have been doing checks all along but we should inform the user something bad has..

\d is less efficient than [0-9]

http://stackoverflow.com/questions/16621738/d-is-less-efficient-than-0-9

c# regex performance share improve this question d checks all Unicode digits while 0 9 is limited to these 10 characters...

Deep Null checking, is there a better way?

http://stackoverflow.com/questions/2080647/deep-null-checking-is-there-a-better-way

and the compiler would generate all the short circuiting checks for you. It didn't make the bar for C# 4. Perhaps for a hypothetical..

Why do we need boxing and unboxing in C#?

http://stackoverflow.com/questions/2111857/why-do-we-need-boxing-and-unboxing-in-c

because on reference types uses reference equality which checks if the references are equal not if the underlying values are..

Hash and salt passwords in C#

http://stackoverflow.com/questions/2138429/hash-and-salt-passwords-in-c-sharp

you cannot use the equality operator on byte arrays it checks references and so you should simply loop through both arrays..

How do I split a string by strings and include the delimiters using .NET?

http://stackoverflow.com/questions/2484919/how-do-i-split-a-string-by-strings-and-include-the-delimiters-using-net

be avoided if possible. Update I did some performance checks and compared the results too lazy to formally check them though..

C# Object Pooling Pattern implementation

http://stackoverflow.com/questions/2510975/c-sharp-object-pooling-pattern-implementation

i.e. in the PreloadItems method shown last. AcquireLazy checks to see if there are free items in the pool and if not it creates..

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

all of the functionality of existence or permissions checks. Additionally while exception handlers like this are known to..

Get the property, as a string, from an Expression<Func<TModel,TProperty>>

http://stackoverflow.com/questions/2789504/get-the-property-as-a-string-from-an-expressionfunctmodel-tproperty

method fairly clean and allows you to add additional checks in the future if perhaps you find yourself facing a new scenario..

Is DateTime.Now the best way to measure a function's performance?

http://stackoverflow.com/questions/28637/is-datetime-now-the-best-way-to-measure-a-functions-performance

0 ms sw.Elapsed.TotalMilliseconds Stopwatch automatically checks for the existence of high precision timers. It is worth mentioning..

Question about terminating a thread cleanly in .NET

http://stackoverflow.com/questions/3632149/question-about-terminating-a-thread-cleanly-in-net

this method. This a pretty common one. Make periodic checks of the flag at safe points in your algorithm and bail out when..

Cancellation token in Task constructor: why?

http://stackoverflow.com/questions/3712939/cancellation-token-in-task-constructor-why

does then when the task sees that OCE it checks whether the OCE's token matches the Task's token. If it does..

Double dispatch in C#?

http://stackoverflow.com/questions/42587/double-dispatch-in-c

types are evaluated depends on the language. In LISP it checks each type from first to last. Languages with multiple dispatch..

Differences in string compare methods in C#

http://stackoverflow.com/questions/44288/differences-in-string-compare-methods-in-c-sharp

Object.ReferenceEquals stringValue otherStringValue Just checks that references are the same ie. it isn't just two strings with..

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

version. Or they will work out a key that passes all checks and distribute that or backdate the clock etc. It doesn't matter..

Casting vs using the 'as' keyword in the CLR

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

where it's worth using which. Don't do this Bad code checks type twice for no reason if randomObject is TargetType TargetType..

Is there a way to check if a file is in use?

http://stackoverflow.com/questions/876473/is-there-a-way-to-check-if-a-file-is-in-use

around this but all my Googling has only yielded creating checks by using exception handling. This is against my religion so..

How is Math.Pow() implemented in .Net Framework?

http://stackoverflow.com/questions/8870442/how-is-math-pow-implemented-in-net-framework

you the code just have a look for yourself. It basically checks for corner cases then calls the CRT's version of pow . The only..

What is quicker, switch on string or elseif on type?

http://stackoverflow.com/questions/94305/what-is-quicker-switch-on-string-or-elseif-on-type

from a hybrid approach where you perform if else checks for the few types that are most common and then fall back to..

Difference Between Equals and ==

http://stackoverflow.com/questions/971954/difference-between-equals-and

In both .NET and Java the implementation in Object also checks for identity. Note that this depends on the execution time type..

How to implement authorization checks in ASP.NET MVC based on Session data?

http://stackoverflow.com/questions/1151450/how-to-implement-authorization-checks-in-asp-net-mvc-based-on-session-data

public class Secure AuthorizeAttribute summary Checks to see if the user is authenticated and has a valid session..

How to suppress a dialog box displayed by code that I can't change?

http://stackoverflow.com/questions/12532812/how-to-suppress-a-dialog-box-displayed-by-code-that-i-cant-change

true private static bool checkWindow IntPtr hWnd IntPtr lp Checks if hWnd is a Windows dialog StringBuilder sb new StringBuilder..

Checking for directory and file write permissions in .NET

http://stackoverflow.com/questions/1281620/checking-for-directory-and-file-write-permissions-in-net

this private const string TEMP_FILE tempFile.tmp summary Checks the ability to create and write to a file in the supplied directory...

How can I change text on a win32 window?

http://stackoverflow.com/questions/2668731/how-can-i-change-text-on-a-win32-window

false private bool checkWindow IntPtr hWnd IntPtr lp Checks if hWnd is a dialog StringBuilder sb new StringBuilder 260 GetClassName..

How do I create an ODBC DSN entry using C#?

http://stackoverflow.com/questions/334939/how-do-i-create-an-odbc-dsn-entry-using-c

does not exist datasourcesKey.DeleteValue dsnName summary Checks the registry to see if a DSN exists with the specified name..

How to install a windows service programmatically in C#?

http://stackoverflow.com/questions/358700/how-to-install-a-windows-service-programmatically-in-c

the service ServiceInstaller.Uninstall MyServiceName Checks the status of the service ServiceInstaller.GetServiceStatus..

What's the best way to calculate the size of a directory in .NET?

http://stackoverflow.com/questions/468119/whats-the-best-way-to-calculate-the-size-of-a-directory-in-net

string folder float folderSize 0.0f try Checks if the path is valid or not if Directory.Exists folder return..

Is there a Task based replacement for System.Threading.Timer?

http://stackoverflow.com/questions/4890915/is-there-a-task-based-replacement-for-system-threading-timer

0 stopWatch.ElapsedMilliseconds duration break summary Checks if cancelled. summary param name cancelToken The cancel token...

Entity attachment issues in LINQ

http://stackoverflow.com/questions/536400/entity-attachment-issues-in-linq

question In the LinqToSQL designer set all of the Update Checks to Never and when you attach call it like so context.entity.Attach..

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

#endregion #region Properties summary Checks if the dialog is visible use Show Hide methods to set this summary..

AppDomain, handling the exceptions

http://stackoverflow.com/questions/7071957/appdomain-handling-the-exceptions

that starts up looks for all .dll's in its folder. Checks if the dll consists of a plugin. Creates a new AppDomain for..

Merge two object lists with linq

http://stackoverflow.com/questions/720609/merge-two-object-lists-with-linq

that. You must add this code to your Person class. summary Checks if the provided object is equal to the current Person summary.. override int GetHashCode return Name.GetHashCode summary Checks if the provided Person is equal to the current Person summary..

MVC Custom Authentication, Authorization, and Roles Implementation

http://stackoverflow.com/questions/8567358/mvc-custom-authentication-authorization-and-roles-implementation

current role current Roles Enum.Parse typeof Roles role Checks if a user's roles contains Administrator role. public bool IsAdministrator.. userRoles return userRoles.HasFlag Roles.Administrator Checks if user has ANY of the allowed role flags. public bool IsUserInAnyRoles.. return flags.Any flag userRoles.HasFlag flag Checks if user has ALL required role flags. public bool IsUserInAllRoles..

Displaying tooltip on mouse hover of a text

http://stackoverflow.com/questions/873175/displaying-tooltip-on-mouse-hover-of-a-text

richTextBox1.GetCharIndexFromPosition e.Location Checks whether the current word i a URL change the regex to whatever..

Restoring Window Size/Position With Multiple Monitors

http://stackoverflow.com/questions/937298/restoring-window-size-position-with-multiple-monitors

improve this question Try this code. Points of interest Checks if the window is partially visible on any screen's working area...