¡@

Home 

c# Programming Glossary: check

How to check for file lock?

http://stackoverflow.com/questions/1304/how-to-check-for-file-lock

to check for file lock Is there any way to check whether a file is locked.. to check for file lock Is there any way to check whether a file is locked without using a try catch block Right..

How to stop BackgroundWorker on Form's Closing event?

http://stackoverflow.com/questions/1731384/how-to-stop-backgroundworker-on-forms-closing-event

a flag to indicate that the user requested a close. Then check that flag in the BGW's RunWorkerCompleted event handler and..

Creating a byte array from a stream

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

to be that size to start with. Likewise you can put a check at the end and if the length of the stream is the same size..

Automating the InvokeRequired code pattern

http://stackoverflow.com/questions/2367718/automating-the-invokerequired-code-pattern

was a way to attach a function to objects that does this check without having to go through all this extra work like a object1.InvokeIfNecessary.visible..

Validate a username and password against Active Directory?

http://stackoverflow.com/questions/290548/validate-a-username-and-password-against-active-directory

and password against Active Directory I simply want to check if a username and password are correct. c# authentication active..

Deserialize JSON into C# dynamic object?

http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object

out result return null to avoid exception. caller can check for null this way... result null return true result WrapResultObject.. out result return null to avoid exception. caller can check for null this way... result null return true result WrapResultObject..

How to detect Windows 64-bit platform with .NET?

http://stackoverflow.com/questions/336633/how-to-detect-windows-64-bit-platform-with-net

. As Microsoft's Raymond Chen describes you have to first check if running in a 64 bit process I think in .NET you can do so.. in a 64 bit process I think in .NET you can do so by checking IntPtr.Size and if you are running in a 32 bit process you..

How do I make a textbox that only accepts numbers?

http://stackoverflow.com/questions/463299/how-do-i-make-a-textbox-that-only-accepts-numbers

.Text.IndexOf '.' 1 e.Handled true You can remove the check for '.' and the subsequent check for more than one '.' if your.. true You can remove the check for '.' and the subsequent check for more than one '.' if your TextBox shouldn't allow decimal.. shouldn't allow decimal places. You could also add a check for ' ' if your TextBox should allow negative values. share..

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.. randomObject Do something with foo Not only is this checking twice but it may be checking different things if randomObject.. with foo Not only is this checking twice but it may be checking different things if randomObject is a field rather than a..

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

there a way to check if a file is in use I'm writing a program in C# that needs.. around this but all my Googling has only yielded creating checks by using exception handling. This is against my religion so.. stream.Close file is not locked return false Edit Please check all the solutions here. Some of them are great share improve..

Determine a string's encoding in C#

http://stackoverflow.com/questions/1025332/determine-a-strings-encoding-in-c-sharp

out c# string encoding share improve this question Check out Utf8Checker it is simple class that does exactly this in.. encoding share improve this question Check out Utf8Checker it is simple class that does exactly this in pure managed..

How to dynamically create generic C# object using reflection?

http://stackoverflow.com/questions/1151464/how-to-dynamically-create-generic-c-sharp-object-using-reflection

reflection activator share improve this question Check out this article and this simple example . Quick translation..

What NoSQL solutions are out there for .NET? [closed]

http://stackoverflow.com/questions/1777103/what-nosql-solutions-are-out-there-for-net

SETs second 81000 GETs second in an entry level Linux box. Check the benchmarks . In wanting to stay true to Redis I've developed..

XML Serialization and Inherited Types

http://stackoverflow.com/questions/20084/xml-serialization-and-inherited-types

specified in the XML. Type type Type.GetType typeAttrib Check the Type is Found. if type null throw new InvalidCastException.. ' because the type specified in the XML was not found. Check the Type is a Subclass of the AbstractType. if type.IsSubclassOf..

Parsing CSV files in C#

http://stackoverflow.com/questions/2081418/parsing-csv-files-in-c-sharp

Let a library handle all the nitty gritty details for you Check out FileHelpers and stay DRY Don't Repeat Yourself no need to..

.NET - What's the best way to implement a “catch all exceptions handler”

http://stackoverflow.com/questions/219594/net-whats-the-best-way-to-implement-a-catch-all-exceptions-handler

stopped working dialog shown. You still can avoid that. Check out class Program void Run AppDomain.CurrentDomain.UnhandledException..

Using AES encryption in C#

http://stackoverflow.com/questions/273452/using-aes-encryption-in-c-sharp

EncryptStringToBytes string plainText byte Key byte IV Check arguments. if plainText null plainText.Length 0 throw new ArgumentNullException.. DecryptStringFromBytes byte cipherText byte Key byte IV Check arguments. if cipherText null cipherText.Length 0 throw new..

delegate keyword vs. lambda notation [duplicate]

http://stackoverflow.com/questions/299703/delegate-keyword-vs-lambda-notation

else with expressions uses System.Linq.Queryable . Check out the parameters on those methods. An Explanation from ScottGu..

How do I use IValidatableObject?

http://stackoverflow.com/questions/3400542/how-do-i-use-ivalidatableobject

are out of range if the whole object is not enabled else Check if Prop1 and Prop2 meet their range requirements here and return..

What static analysis tools are available for C#? [closed]

http://stackoverflow.com/questions/38635/what-static-analysis-tools-are-available-for-c

detection Tools Fxcop excellent tool by Microsoft. Check compliance with .net framework guidelines. No longer available.. add in Vil old tool that doesn't support .NET 2.0 Checking Style Tools StyleCop Microsoft tool run from inside of Visual..

C# String enums

http://stackoverflow.com/questions/424366/c-sharp-string-enums

Enum value string output null Type type value.GetType Check first in our cached results... Look for our 'StringValueAttribute'..

C#: How to Make it Harder for Hacker/Cracker to Get Around or Bypass the Licensing Check?

http://stackoverflow.com/questions/4532540/c-how-to-make-it-harder-for-hacker-cracker-to-get-around-or-bypass-the-licensi

for Hacker Cracker to Get Around or Bypass the Licensing Check First of all I understand that almost all applications can..

Check if a class is derived from a generic class

http://stackoverflow.com/questions/457676/check-if-a-class-is-derived-from-a-generic-class

if a class is derived from a generic class I have a generic.. static bool IsSubclassOfRawGeneric Type generic Type toCheck while toCheck null toCheck typeof object var cur toCheck.IsGenericType.. IsSubclassOfRawGeneric Type generic Type toCheck while toCheck null toCheck typeof object var cur toCheck.IsGenericType toCheck.GetGenericTypeDefinition..

How can I close a login form and show the main form without my application closing?

http://stackoverflow.com/questions/4759334/how-can-i-close-a-login-form-and-show-the-main-form-without-my-application-closi

responsible bit of code Application.Run new LoginForm . Check out the documentation for that method here on MSDN which explains..

EF Including Other Entities (Generic Repository pattern)

http://stackoverflow.com/questions/5376421/ef-including-other-entities-generic-repository-pattern

now I can't figure out how to include multiple entities. Check out what I've got so far public IQueryable TEntity GetQuery..

Display lines number in Stack Trace for .NET assembly in Release mode

http://stackoverflow.com/questions/628565/display-lines-number-in-stack-trace-for-net-assembly-in-release-mode

on the Build vertical tab . Select Release configuration. Check the DEBUG constant parameter. Uncheck the Optimize code parameter..

Free obfuscation tools for .NET [closed]

http://stackoverflow.com/questions/805549/free-obfuscation-tools-for-net

share improve this question Maybe Eazfuscator.NET Check out this SO question Best .NET obfuscation tools strategy Since..

Possible to call C++ code from C#?

http://stackoverflow.com/questions/935664/possible-to-call-c-code-from-c

it like so ManagedType mt new ManagedType mt.ManagedMethod Check out this blog post for a more explained example. share improve..