¡@

Home 

c# Programming Glossary: is

Create Excel (.XLS and .XLSX) file from C# [closed]

http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp

the file using OLE Automation. The .CSV file solution is easy and is the current way I am handling this but I would like.. using OLE Automation. The .CSV file solution is easy and is the current way I am handling this but I would like to control.. solution is easy and is the current way I am handling this but I would like to control the output formats. EDIT I am still..

How to properly clean up Excel interop objects

http://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects

null GC.Collect GC.WaitForPendingFinalizers Although this kind of works the Excel.exe process is still in the background.. Although this kind of works the Excel.exe process is still in the background even after I close Excel. It is only.. is still in the background even after I close Excel. It is only released once my application is manually closed. Anyone..

Random number generator only generating one random number

http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number

call it byte mac new byte 6 for int x 0 x 6 x mac x byte Misc.RandomNumber int 0xFFFF int 0xFFFFFF 256 If I step that loop.. the debugger during runtime I get different values which is what I want . However if I put a breakpoint two lines below.. value. Why does that happen c# random share improve this question Every time you do new Random it is initialized using..

Should Usings be inside or outside the namespace

http://stackoverflow.com/questions/125319/should-usings-be-inside-or-outside-the-namespace

that my using statements should be inside the namespace. Is there a technical reason for putting the using statements inside..

Best way to copy between two Stream instances

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

the best way to copy the contents of one stream to another Is there a standard utility method for this c# stream copying..

Why is lock(this) {…} bad?

http://stackoverflow.com/questions/251391/why-is-lockthis-bad

the instance can be accessed publicly . I'm wondering why Is it because the lock will be held longer than necessary Or is..

C# Captured Variable In Loop

http://stackoverflow.com/questions/271440/c-sharp-captured-variable-in-loop

a result when they get invoked they all have same output. Is there any way to walk round this limit to have each action instance..

Deserialize JSON into C# dynamic object?

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

JSON into C# dynamic object Is there a way to deserialize JSON content into a C# 4 dynamic..

Sending email in .NET through Gmail

http://stackoverflow.com/questions/32260/sending-email-in-net-through-gmail

are personalized emails to the bands I play on my show. Is it possible to do c# .net email gmail share improve this..

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

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

returns Win32NT even when running on Windows Vista 64 bit. Is there any other method to know the correct platform 32 or 64.. 32 bit process you still have to call the Win API function IsWow64Process. If this returns true you are running in a 32 bit.. 8 bool is64BitOperatingSystem is64BitProcess InternalCheckIsWow64 DllImport kernel32.dll SetLastError true CallingConvention..

Dynamic LINQ OrderBy on IEnumerable<T>

http://stackoverflow.com/questions/41244/dynamic-linq-orderby-on-ienumerablet

the method included only works on IQueryable T . Is there any way to get this functionality on IEnumerable T c#.. .GetMethods .Single method method.Name methodName method.IsGenericMethodDefinition method.GetGenericArguments .Length 2..

Case insensitive 'Contains(string)'

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

insensitive 'Contains string ' Is there a way to make the following return true string title ASTRINGTOTEST..

Casting vs using the 'as' keyword in the CLR

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

i null values i 1 x values i 2 new object FindLengthWithIsAndCast values FindLengthWithIsAndAs values FindLengthWithAsAndNullCheck.. 2 new object FindLengthWithIsAndCast values FindLengthWithIsAndAs values FindLengthWithAsAndNullCheck values static void.. values static void FindLengthWithIsAndCast object values Stopwatch sw Stopwatch.StartNew int len..

Use of Application.DoEvents()

http://stackoverflow.com/questions/5181777/use-of-application-doevents

Can Application.DoEvents be used in C# Is this function a way to allow the GUI to catch up with the rest..

Creating a blocking Queue<T> in .NET?

http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net

right now and my question is How can this be improved Is there an object that already enables this behavior in the BCL..

How does one parse XML files? [closed]

http://stackoverflow.com/questions/55828/how-does-one-parse-xml-files

suspect that I must be missing something in my searches. Is there a simpler method of parsing XML files in C# If so what..

Convert HTML to PDF in .NET [closed]

http://stackoverflow.com/questions/564650/convert-html-to-pdf-in-net

when it encounters Table and the layout just gets messy. Is there any free library available c# html pdf share improve..

Retrieving Property name from lambda expression

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

Property name from lambda expression Is there a better way to get the Property name when passed in via.. if type propInfo.ReflectedType type.IsSubclassOf propInfo.ReflectedType throw new ArgumentException..

Is it possible to dynamically compile and execute C# code fragments?

http://stackoverflow.com/questions/826398/is-it-possible-to-dynamically-compile-and-execute-c-sharp-code-fragments

it possible to dynamically compile and execute C# code fragments..

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.. can't avoid them all of the time protected virtual bool IsFileLocked FileInfo file FileStream stream null try stream file.Open..

C# Finalize/Dispose pattern

http://stackoverflow.com/questions/898828/c-sharp-finalize-dispose-pattern

don't have the finalizer when do I call the Dispose method Is it the client of the class that has to call it So my class in.. that the webclient indirectly uses unmanaged resources Is there any hard and fast rule to follow about this. How do I..

How can I detect the encoding/codepage of a text file

http://stackoverflow.com/questions/90838/how-can-i-detect-the-encoding-codepage-of-a-text-file

the files where created in a different unknown codepage. Is there a way to automatically detect the codepage of a text file..

How to determine MAC Address of the actual physical network card — not virtual network interfaces created by VPN's (.NET C#)

http://stackoverflow.com/questions/1567377/how-to-determine-mac-address-of-the-actual-physical-network-card-not-virtual

PNPDeviceID FROM Win32_NetworkAdapter WHERE MACAddress IS NOT NULL AND PNPDeviceID IS NOT NULL ManagementObjectCollection.. WHERE MACAddress IS NOT NULL AND PNPDeviceID IS NOT NULL ManagementObjectCollection mObject searcher.Get foreach..

SetWindowsHookEx in C#

http://stackoverflow.com/questions/1811383/setwindowshookex-in-c-sharp

typeof Form1 .Module HERE IS THE PROBLEM. WHAT THE HECK DO I PASS INTO THE LAST 2 PARAMS..

TransactionScope bug in .NET? More information?

http://stackoverflow.com/questions/195420/transactionscope-bug-in-net-more-information

information on the web that talked about this issue if it IS an issue so I wonder if anyone has any direct experience with..

multimap in .NET

http://stackoverflow.com/questions/380595/multimap-in-net

and or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY SOLUTIONS DESIGN ``AS IS'' AND ANY EXPRESS.. materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY SOLUTIONS DESIGN ``AS IS'' AND ANY EXPRESS OR IMPLIED.. THIS SOFTWARE IS PROVIDED BY SOLUTIONS DESIGN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED..

Is everything in .NET an object?

http://stackoverflow.com/questions/436211/is-everything-in-net-an-object

sense because a an int isn't a reference to an int IT IS the int. b ints aren't garbage collected. If you declare an..

LINQ to SQL using GROUP BY and COUNT(DISTINCT)

http://stackoverflow.com/questions/448203/linq-to-sql-using-group-by-and-countdistinct

to SQL using GROUP BY and COUNT DISTINCT I have to perform the following SQL query select answer_nbr.. this question There isn't direct support for COUNT DISTINCT x but you can simulate it from an IGrouping i.e. what group.. does the job SELECT t1 . Country SELECT COUNT FROM SELECT DISTINCT t2 . City FROM dbo . Customers AS t2 WHERE t1 . Country..

Remove trailing zeros?

http://stackoverflow.com/questions/4525854/remove-trailing-zeros

this question Is it not as simple as this if the input IS a string string.Format 0 G29 decimal.Parse 2.0044 or decimal.Parse..

Top level domain from URL in C#

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

for this. We receive a lot of strange requests on our IIS 6.0 servers and I want to log and catalog these by domain. Eg... but I would like to sort them all into one as example.com IS hosted on our servers. The rest isn't sorry So I am looking..

Difference between Interface, abstract class, sealed class, static class and partial class in C#? [closed]

http://stackoverflow.com/questions/4756065/difference-between-interface-abstract-class-sealed-class-static-class-and-par

question abstract classes Should be used when there is a IS A relationship and no instances should be allowed to be created..

Entity Framework: Setting a Foreign Key Property

http://stackoverflow.com/questions/480872/entity-framework-setting-a-foreign-key-property

stuck on 3.5 you have to do a little bit of work but it IS possible. You have to do it like this Locker locker new Locker..

EF 4.1 - Code First - JSON Circular Reference Serialization Error

http://stackoverflow.com/questions/5588143/ef-4-1-code-first-json-circular-reference-serialization-error

get set public string Email get set NOTE ADDRESS CLASS IS NEW ADDITION DURING EDIT Address public class Address Key public..

LINQ Expression to return Property value?

http://stackoverflow.com/questions/567963/linq-expression-to-return-property-value

Group g Parameters g.Select x x.Parameter .SelectMany g THIS PART FAILS MISERABLY items.Where item g.Parameters.Contains.. g.Select x x.Parameter .SelectMany g THIS PART FAILS MISERABLY items.Where item g.Parameters.Contains property.Compile.. 5 ids Console.WriteLine cust.CompanyName THIS IS THE INTERESTING BIT public static class QueryableChunked..

In .NET 4.0, how do I 'sandbox' an in-memory assembly and execute a method?

http://stackoverflow.com/questions/5997995/in-net-4-0-how-do-i-sandbox-an-in-memory-assembly-and-execute-a-method

a way to create an AppDomain and load an assembly THAT IS NOT ON THE FILE SYSTEM but rather in RAM. Again the reasons..

.NET - Convert Generic Collection to DataTable

http://stackoverflow.com/questions/701223/net-convert-generic-collection-to-datatable

foreach PropertyDescriptor prop in properties HERE IS WHERE THE ERROR IS THROWN FOR NULLABLE TYPES table.Columns.Add.. prop in properties HERE IS WHERE THE ERROR IS THROWN FOR NULLABLE TYPES table.Columns.Add prop.Name prop.PropertyType..

More Elegant Exception Handling Than Multiple Catch Blocks? [duplicate]

http://stackoverflow.com/questions/791390/more-elegant-exception-handling-than-multiple-catch-blocks

this question In my opinion a bunch of ugly catch blocks IS the best way to handle that situation. The reason I prefer this..

Understanding WCF Windows Authentication

http://stackoverflow.com/questions/9588265/understanding-wcf-windows-authentication

IS the Windows credentials the Windows identity used to call your..