¡@

Home 

c# Programming Glossary: eg

How to get difference between two dates in Year/Month/Week/Day?

http://stackoverflow.com/questions/1083955/how-to-get-difference-between-two-dates-in-year-month-week-day

two dates in Year Month Week Day in an efficient way eg. difference between two dates is 1 Year 2 Months 3 Weeks 4 Days... period.Days 7 I suggest you avoid even thinking about negative periods make sure everything is positive all the time...

Using JsonConvert.DeserializeObject to deserialize Json to a C# POCO class

http://stackoverflow.com/questions/11126242/using-jsonconvert-deserializeobject-to-deserialize-json-to-a-c-sharp-poco-class

User. summary public class User summary A User's username. eg sergiotapia mrkibbles matumbo summary public string Username.. public string Username get set summary A User's name. eg Sergio Tapia John Cosack Lucy McMillan summary public string.. it is a normal .NET type e.g. not a primitive type like integer not a collection type like an array or List that can be deserialized..

Difference between ref and out parameters in .NET [duplicate]

http://stackoverflow.com/questions/135234/difference-between-ref-and-out-parameters-in-net

are for data that's an additional output for the function eg int.TryParse that are already using the return value for something...

How to convert a column number (eg. 127) into an excel column (eg. AA)

http://stackoverflow.com/questions/181596/how-to-convert-a-column-number-eg-127-into-an-excel-column-eg-aa

to convert a column number eg. 127 into an excel column eg. AA How do you convert a numerical.. to convert a column number eg. 127 into an excel column eg. AA How do you convert a numerical number to an Excel column..

Why use ref keyword when passing an Object?

http://stackoverflow.com/questions/186891/why-use-ref-keyword-when-passing-an-object

too if you want to change the value of an immutable object eg a string. You can't change the value of a string once it has.. above. But when the parameter type is a primitive value eg int then if this parameter is assigned to within the method..

Single-assembly multi-language Windows Forms deployment (ILMerge and satellite assemblies / localization) - possible?

http://stackoverflow.com/questions/1952638/single-assembly-multi-language-windows-forms-deployment-ilmerge-and-satellite-a

Designer to use MyResourceManager I did not find a more elegant solution I use fart.exe in a pre build step to auto replace... was merging the first satellite assembly in multiple times eg command line c Program Files Microsoft ILMerge ILMerge.exe t..

How to know a process is 32-bit or 64-bit programmatically

http://stackoverflow.com/questions/1953377/how-to-know-a-process-is-32-bit-or-64-bit-programmatically

process is running in 32 bit or 64 bit mode for eg. i will start a process abc.exe. In c# how can we know whether..

difference between throw and throw new Exception()

http://stackoverflow.com/questions/2999298/difference-between-throw-and-throw-new-exception

try ... catch Exception e throw new Exception e.message Regardless that the second shows a message c# share improve this.. original stack trace of the exception as well as its type. eg IOException . In addition some exceptions hold additional information.. . In addition some exceptions hold additional information eg ArgumentException.ParamName . throw new Exception ex.Message..

Comparison of XSD Code Generators

http://stackoverflow.com/questions/386155/comparison-of-xsd-code-generators

the various options affect output. It also has tight VS integration including context menu integration and a custom build.. It also has tight VS integration including context menu integration and a custom build tool which means that if you reference.. a custom build tool CodeXS Quite a good tool but less integration features and no longer maintained XSDObjectGen No longer..

Split List into Sublists with LINQ

http://stackoverflow.com/questions/419019/split-list-into-sublists-with-linq

a group of 3 items of the original list sequentially . eg. Original List a g e w p s q f x y i m c Resulting lists a g..

Calling null on a class vs Dispose()

http://stackoverflow.com/questions/574019/calling-null-on-a-class-vs-dispose

Dispose Also if I have a code block with a using statement eg below if I step through the code and exit the using block is.. mydispobj new MyDisposableObj Stream classes eg BinaryWriter have a Finalize method Why would I want to use..

Retrieving Property name from lambda expression

http://stackoverflow.com/questions/671968/retrieving-property-name-from-lambda-expression

in via a lambda expression Here is what i currently have. eg. GetSortingInfo User u u.UserId It worked by casting it as a..

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

directly managing file associations but you can use the Registry classes for reading and writing the keys you need to. You'll.. HKEY_CLASSES_ROOT with the name set to your file extension eg .txt . Set the default value of this key to a unique name for.. path to the file selected. For instance here's a sample registry file to create an association between .txt files and EmEditor..

.NET Events for Process executable start

http://stackoverflow.com/questions/848618/net-events-for-process-executable-start

Events for Process executable start Is there any way to register for an event that fires when an executable of a particular.. when a process exits by getting the process handle and registering for the exited event. But how can you be notified when.. and or WatchForProcessEnd passing in your process name eg notepad.exe . The ManagementEventWatcher object is returned..

Get int value from enum

http://stackoverflow.com/questions/943398/get-int-value-from-enum

object for that foo . Is there an easy way to get the integer value off the enum so I can do something like this Questions.Get.. enums share improve this question Just cast the enum eg. int something int Question.Role share improve this answer..

Is there an easy way to check .NET Framework version using C#?

http://stackoverflow.com/questions/951856/is-there-an-easy-way-to-check-net-framework-version-using-c

like this should do it. Just grab the value from the registry Edit Updated a bit Framework is the highest installed version.. version SP is the service pack for that version. RegistryKey installed_versions Registry.LocalMachine.OpenSubKey.. pack for that version. RegistryKey installed_versions Registry.LocalMachine.OpenSubKey @ SOFTWARE Microsoft NET Framework..

List the months between two dates

http://stackoverflow.com/questions/11930565/list-the-months-between-two-dates

the months and year s between the two dates be retrieved. Eg Start Date '1 1 2011' mm dd yyyy and End date '11 30 2011' ...

c# get complete URL with “#” [duplicate]

http://stackoverflow.com/questions/1322108/c-sharp-get-complete-url-with

ref char. And i would like that to when I grab the URL Eg. http localhost site page.aspx var 1 var 2#link I have tried..

Alternatives to Thread.Sleep() for simulating pauses

http://stackoverflow.com/questions/1457282/alternatives-to-thread-sleep-for-simulating-pauses

to simulating a pause in execution of a program Eg a loop Although I suppose this involves a lot of overhead in..

Simple C# CSV Excel export class

http://stackoverflow.com/questions/2422212/simple-c-sharp-csv-excel-export-class

If it has a comma it needs surrounding with double quotes Eg Sydney Australia Sydney Australia Also if it contains any double.. quotes then they need to be replaced with quad quotes sic Eg Dangerous Dan McGrew Dangerous Dan McGrew summary string MakeValueCsvFriendly..

How to print PDF on default network printer using GhostScript (gswin32c.exe) shell command

http://stackoverflow.com/questions/2599925/how-to-print-pdf-on-default-network-printer-using-ghostscript-gswin32c-exe-she

summary param name ghostScriptPath The ghost script path. Eg C Program Files gs gs8.71 bin gswin32c.exe param param name.. copies. param param name printerName Name of the printer. Eg server_name printer_name param param name pdfFileName Name of.. summary param name ghostScriptPath The ghost script path. Eg C Program Files gs gs8.71 bin gswin32c.exe param param name..

How to get efficient Sql Server deadlock handling in C# with ADO?

http://stackoverflow.com/questions/320636/how-to-get-efficient-sql-server-deadlock-handling-in-c-sharp-with-ado

is happening. Fixing this may be hiding a bigger problem Eg. missing index or bad query . Second I would review my architecture..

Limiting double to 3 decimal places

http://stackoverflow.com/questions/3814190/limiting-double-to-3-decimal-places

only keep until the first 3 dec places do not round. Eg. 12.878999 12.878 If a double has less than 3 decimals leave.. If a double has less than 3 decimals leave unchanged Eg. 125 125 89.24 89.24 I came across this command double example..

How to round up value C# to the nearest integer?

http://stackoverflow.com/questions/3920553/how-to-round-up-value-c-sharp-to-the-nearest-integer

to the nearest integer I want to round up double to int. Eg double a 0.4 b 0.5 I want to change them both to integer. so..

Is there a good LINQ way to do a cartesian product?

http://stackoverflow.com/questions/4073713/is-there-a-good-linq-way-to-do-a-cartesian-product

combination of puppies taking 1 puppy from each dog. Eg dog 1 puppy A dog 2 puppy A dog 1 puppy A dog 2 puppy B dog..

Top level domain from URL in C#

http://stackoverflow.com/questions/4643227/top-level-domain-from-url-in-c-sharp

6.0 servers and I want to log and catalog these by domain. Eg. we get some strange requests like these http www.poker.winner4ever.example.com..

Intercept SQL statements containing parameter values generated by NHibernate

http://stackoverflow.com/questions/6048835/intercept-sql-statements-containing-parameter-values-generated-by-nhibernate

without the parameter values.. They are replaced by ' ' Eg .... WHERE USER0_.USERNAME The only alternative approach i found..

What does the bitwise or | operator do?

http://stackoverflow.com/questions/612072/what-does-the-bitwise-or-operator-do

memory and explain the reasoning Also how can I say and or Eg. if dropdown1 hello and or dropdown2 hello .... Thanks c# .net..

Different combinations of an array (C#)

http://stackoverflow.com/questions/7643885/different-combinations-of-an-array-c

and comb array 3 gives output 1 2 3 2 3 4 3 4 5 and so on Eg valid comnbination for array 1 2 3 and length 2 are 1 2 1 3..

Which cryptographic hash function should I choose?

http://stackoverflow.com/questions/800685/which-cryptographic-hash-function-should-i-choose

collisions when hashing file names or other short strings Eg. 2 random file names with same MD5 hash with MD5 SHA1 SHA2xx..

How can i get the path of the current user's “Application Data” folder?

http://stackoverflow.com/questions/915210/how-can-i-get-the-path-of-the-current-users-application-data-folder

get the user name too so that i can goto ApplicaitionData. Eg D Documents and Settings user Application Data . c# share..