¡@

Home 

c# Programming Glossary: given

Encrypt/Decrypt string in .NET

http://stackoverflow.com/questions/202011/encrypt-decrypt-string-in-net

Encoding.ASCII.GetBytes o6806642kbM7c5 summary Encrypt the given string using AES. The string can be decrypted using DecryptStringAES.. from the memory stream. return outStr summary Decrypt the given string. Assumes the string was encrypted using EncryptStringAES..

High Quality Image Scaling C#

http://stackoverflow.com/questions/249587/high-quality-image-scaling-c-sharp

result summary Saves an image as a jpeg image with the given quality summary param name path Path to which the image would.. encoderParams summary Returns the image codec with the given mime type summary public static ImageCodecInfo GetEncoderInfo..

Deserialize JSON into C# dynamic object?

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

dynamic obj serializer.Deserialize json typeof object So given a JSON string Items Name Apple Price 12.3 Name Grape Price 3.21..

How to read a text file reversely with iterator in C#

http://stackoverflow.com/questions/452902/how-to-read-a-text-file-reversely-with-iterator-in-c-sharp

readonly int bufferSize summary Function which when given a position within a file and a byte states whether or not the..

.NET String to byte Array C#

http://stackoverflow.com/questions/472906/net-string-to-byte-array-c-sharp

bytes . If you used a specific encoding though it would've given you trouble with encoding decoding invalid characters. share..

Proper use of the IDisposable interface

http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface

to free managed resources. This internal method could be given some arbitrary name like CoreDispose or MyInternalDispose but..

Using .NET, how can you find the mime type of a file based on the file signature not the extension

http://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature

a mime type where the file extension is incorrect or not given something similar to this question only in .Net. c# mime mime..

How to check if a number is a power of 2

http://stackoverflow.com/questions/600293/how-to-check-if-a-number-is-a-power-of-2

log return pow number This returned true for the given wrong value 9223372036854775809 . Does anyone have any suggestion..

Properties vs Methods

http://stackoverflow.com/questions/601621/properties-vs-methods

but that also touches on the example that I have given. c# properties methods share improve this question From..

What is the difference between Decimal, Float and Double in C#?

http://stackoverflow.com/questions/618535/what-is-the-difference-between-decimal-float-and-double-in-c

example but there are others too. Consider the score given to divers or ice skaters for example. For values which are more..

C#, int or Int32? Should I care?

http://stackoverflow.com/questions/62503/c-int-or-int32-should-i-care

that int is preferred over Int32 but without any reason given. So what is the reason Should I care c# variable types share..

How check if given string is legal (allowed) file name under Windows?

http://stackoverflow.com/questions/62771/how-check-if-given-string-is-legal-allowed-file-name-under-windows

check if given string is legal allowed file name under Windows I want to include..

How to associate a file extension to the current executable in C#

http://stackoverflow.com/questions/69761/how-to-associate-a-file-extension-to-the-current-executable-in-c-sharp

afterwards in explorer it'll run my executable with the given file as the first argument. Ideally it'd also set the icon for.. the first argument. Ideally it'd also set the icon for the given file extensions to the icon for my executable. Thanks all. ..

How to get a user's client IP address in ASP.NET?

http://stackoverflow.com/questions/735350/how-to-get-a-users-client-ip-address-in-asp-net

and my employer is probably very happy about this . AT any given time there would be hundreds or even thousands of people at..

C# Events and Thread Safety

http://stackoverflow.com/questions/786383/c-sharp-events-and-thread-safety

isn't an issue for single threaded programs and in fact given the absence of volatile in most online example code the advice..

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

summary Return a list of processes that hold on the given file. summary public static List Process GetProcessesLockingFile..

ExecuteReader requires an open and available Connection. The connection's current state is Connecting

http://stackoverflow.com/questions/9705637/executereader-requires-an-open-and-available-connection-the-connections-curren

by keeping alive a set of active connections for each given connection configuration. Whenever a user calls Open on a connection..

Given a DateTime object, how do I get a ISO 8601 date in string format?

http://stackoverflow.com/questions/114983/given-a-datetime-object-how-do-i-get-a-iso-8601-date-in-string-format

a DateTime object how do I get a ISO 8601 date in string format.. object how do I get a ISO 8601 date in string format Given DateTime.UtcNow How do I get a string which represents the same..

Compiler Ambiguous invocation error - anonymous method and method group with Func<> or Action

http://stackoverflow.com/questions/2057146/compiler-ambiguous-invocation-error-anonymous-method-and-method-group-with-fun

X does method group X convert to D1 Does it convert to D2 Given a delegate type D and an expression E that is classified as..

What is the C# Using block and why should I use it?

http://stackoverflow.com/questions/212198/what-is-the-c-sharp-using-block-and-why-should-i-use-it

type implements IDisposable it automatically disposes it. Given public class SomeDisposableType IDisposable ...implmentation..

Conditional operator cannot cast implicitly?

http://stackoverflow.com/questions/2215745/conditional-operator-cannot-cast-implicitly

implicitly I'm a little stumped by this little C# quirk Given variables Boolean aBoolValue Byte aByteValue The following compiles..

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

. # . For instance a delimiter of . should be escaped . . Given a list of delimiters you need to OR them using the pipe symbol..

What does placing a @ in front of a C# variable name do?

http://stackoverflow.com/questions/254669/what-does-placing-a-in-front-of-a-c-sharp-variable-name-do

@step.LoadInstanceId @step.ResultCode @step.StatusCode Given that step isn't a reserved word is there any reason that they..

In what areas might the use of F# be more appropriate than C#? [closed]

http://stackoverflow.com/questions/2785029/in-what-areas-might-the-use-of-f-be-more-appropriate-than-c

Lambdas Closures Anonymous Delegates and more... Given C#'s adoption of these functional features and F#'s taxonomy..

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

to handle the trivial and deeply nested cases Requirements Given the expression p p.FirstName I need a string of FirstName ... expression p p.FirstName I need a string of FirstName . Given the expression p p.Address.State.Abbreviation I need a string..

Why is it important to override GetHashCode when Equals method is overridden?

http://stackoverflow.com/questions/371328/why-is-it-important-to-override-gethashcode-when-equals-method-is-overridden

to override GetHashCode when Equals method is overridden Given the following class public class Foo public int FooId get set..

C# Point in polygon

http://stackoverflow.com/questions/4243042/c-sharp-point-in-polygon

the same side of all the line segments making up the path. Given a line segment between P0 x0 y0 and P1 x1 y1 another point P..

Import and Export Excel - What is the best library? [closed]

http://stackoverflow.com/questions/444522/import-and-export-excel-what-is-the-best-library

CSV directly if I had a tool to convert to and from Excel. Given Excel 2007 is an xml based and zipped file format I am guessing..

Case insensitive 'Contains(string)'

http://stackoverflow.com/questions/444798/case-insensitive-containsstring

text is in . If you don't know you'll have to take a punt. Given English's hegemony in software you should probably resort to..

Working way to make video from images in C#

http://stackoverflow.com/questions/539257/working-way-to-make-video-from-images-in-c-sharp

on Linux. The two Windows builds I downloaded are broken. Given this command line ffmpeg r 1 f image2 i jpeg .jpg video.avi..

Executing Batch File in C#

http://stackoverflow.com/questions/5519328/executing-batch-file-in-c-sharp

static void Main ExecuteCommand echo testing EDIT Given the extra information in your comment below I was able to recreate..

Arithmetic operator overloading for a generic class in C#

http://stackoverflow.com/questions/756954/arithmetic-operator-overloading-for-a-generic-class-in-c-sharp

operator overloading for a generic class in C# Given a generic class definition like public class ConstrainedNumber..

using LINQ to remove objects within a List<T>

http://stackoverflow.com/questions/853526/using-linq-to-remove-objects-within-a-listt

from x in authorsList where x.firstname Bob select x Given that authorsList is of type List how can I delete any Author..

How do I calculate someone's age in C#?

http://stackoverflow.com/questions/9/how-do-i-calculate-someones-age-in-c

do I calculate someone's age in C# Given a DateTime representing a person's birthday how do I calculate..

Find a private field with Reflection?

http://stackoverflow.com/questions/95910/find-a-private-field-with-reflection

a private field with Reflection Given this class class Foo Want to find _bar with reflection SomeAttribute..