¡@

Home 

c# Programming Glossary: am

How to get my own IP address in C#?

http://stackoverflow.com/questions/1069103/how-to-get-my-own-ip-address-in-c

to get my own IP address in C# I am running a server and I want to display my own IP address. What.. host string localIP host Dns.GetHostEntry Dns.GetHostName foreach IPAddress ip in host.AddressList if ip.AddressFamily.ToString.. foreach IPAddress ip in host.AddressList if ip.AddressFamily.ToString InterNetwork localIP ip.ToString return localIP..

C# Interfaces. Implicit implementation versus Explicit implementation

http://stackoverflow.com/questions/143405/c-sharp-interfaces-implicit-implementation-versus-explicit-implementation

need two implemetations. But regardless i rarely use it. I am sure there are more reasons to use it not use it that others..

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

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

The .CSV file solution is easy and is the current way I am handling this but I would like to control the output formats... but I would like to control the output formats. EDIT I am still looking at these to see the best alternative for my solution... but that also puts a Excel 2003 requirement on the file. I am currently looking at a port of the PEAR PHP library Excel Writer..

How to properly clean up Excel interop objects

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

my application is manually closed. Anyone realize what I am doing wrong or has an alternative to ensure interop objects..

Best Practice: Initialize class fields in constructor or at declaration?

http://stackoverflow.com/questions/24551/best-practice-initialize-class-fields-in-constructor-or-at-declaration

fields in constructor or at declaration I've been programming in C# and Java recently and I am curious what people would.. I've been programming in C# and Java recently and I am curious what people would consider the best practice concerning.. in declaration if you don't have a constructor parameter that changes the value of the field. 3. If the value of..

Natural Sort Order in C#

http://stackoverflow.com/questions/248603/natural-sort-order-in-c-sharp

Order in C# Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array I am.. of a natural order sort in C# for an FileInfo array I am implementing the IComparer interface in my sorts. c# sorting.. string psz1 string psz2 Michael Kaplan has some examples of how this function works here and the changes that were..

How can I read the properties of a C# class dynamically?

http://stackoverflow.com/questions/4629/how-can-i-read-the-properties-of-a-c-sharp-class-dynamically

can I read the properties of a C# class dynamically I can do an eval something to execute the code dynamically.. I can do an eval something to execute the code dynamically in JavaScript. Is there a way for me to do the same thing.. in JavaScript. Is there a way for me to do the same thing in C# What I am exactly trying to do is that I have an..

Creating a blocking Queue<T> in .NET?

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

adding to a queue and multiple threads reading from the same queue. If the queue reaches a specific size all threads that.. is removed from the queue. The solution below is what I am using right now and my question is How can this be improved..

Proper use of the IDisposable interface

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

garbage collector should take care of that for you. For example public class MyCollection IDisposable private List String.. normally would edit So far people have posted some good examples of using IDisposable to clean up unmanaged resources such.. unmanaged resource If you found it in the Microsoft .NET Framework it's managed. If you went poking around MSDN yourself it's..

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

of a file based on the file signature not the extension I am looking for a simple way to get a mime type where the file extension..

Create Generic method constraining T to an Enum

http://stackoverflow.com/questions/79126/create-generic-method-constraining-t-to-an-enum

value.Trim .ToLower return item return defaultValue I am getting a Error Constraint cannot be special class 'System.Enum'... but is there a workaround to allow a Generic Enum or am I going to have to mimic the Parse function and pass a type.. on I've left the loop to maintain case insensitivity I am usng this when parsing XML public static class EnumUtils public..

C# Finalize/Dispose pattern

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

C# 2008 I have been working on this for a while now. And I am still confused about some issues. My questions below I know.. of the class that has to call it So my class in the example is called NoGateway and the client could use and dispose.. stuff with object objNoGateway.Dispose finished with it I am using the webclient class in my NoGateway class. Because the..

C#: Test if string is a guid without throwing exceptions?

http://stackoverflow.com/questions/104850/c-test-if-string-is-a-guid-without-throwing-exceptions

suggestion. Update 2 Why worry about thrown exceptions Am I really expecting invalid GUIDs all that often The answer is..

.NET HashTable Vs Dictionary - Can the Dictionary be as fast?

http://stackoverflow.com/questions/1089132/net-hashtable-vs-dictionary-can-the-dictionary-be-as-fast

My question is really what might those situations be Am I just wrong in my assumptions above What situations might you..

How to bind to a PasswordBox in MVVM

http://stackoverflow.com/questions/1483892/how-to-bind-to-a-passwordbox-in-mvvm

is no problem but in my ViewModel the Password is empty. Am I doing something wrong or missing a step I put a breakpoint..

Views in separate assemblies in ASP.NET MVC

http://stackoverflow.com/questions/19746/views-in-separate-assemblies-in-asp-net-mvc

without having to go through the whole deployment step. Am I missing something obvious Or should I resort to creating my..

Am I Running as a Service

http://stackoverflow.com/questions/200163/am-i-running-as-a-service

I Running as a Service I am currently writing a little bootstrap..

Why is the C# “as” operator so popular? [closed]

http://stackoverflow.com/questions/2139798/why-is-the-c-sharp-as-operator-so-popular

into a useless NullReferenceException . Am I the only one who thinks that this a blatant abuse of the as..

XML Serialization and namespace prefixes

http://stackoverflow.com/questions/2339782/xml-serialization-and-namespace-prefixes

internally with something that I'm not able to control. Am I able to control it with either of these serializers I can..

How do I use IValidatableObject?

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

to ignore failures on some properties in certain cases. Am I trying to use it incorrectly in the case below If not how..

LINQ: Max or Default?

http://stackoverflow.com/questions/341264/linq-max-or-default

but that feels a little obtuse for such a simple request. Am I missing a better way to do it UPDATE Here's the back story..

Will using LINQ to SQL help prevent SQL injection

http://stackoverflow.com/questions/473173/will-using-linq-to-sql-help-prevent-sql-injection

saving and am using linq to update write to the database. Am I safe using linq This example is creating the user account...

Model-View-Presenter in WinForms

http://stackoverflow.com/questions/4794121/model-view-presenter-in-winforms

below When the winform loads it has to obtain a treeview. Am I correct in thinking that the view should therefore call a.. Would the view hold references to them or the presenter Am I correct in thinking that the view should handle every single.. 1. When the winform loads it has to obtain a treeview. Am I correct in thinking that the view should therefore call a..

Early and late binding

http://stackoverflow.com/questions/484214/early-and-late-binding

to catch invalid calls. C# does not support this feature. Am I heading in the right direction What about calling delegates..

Clipboard.GetText returns null (empty string)

http://stackoverflow.com/questions/518701/clipboard-gettext-returns-null-empty-string

but same result. Am I missing something obvious Thanks c# .net share improve..

Writing to a TextBox from another thread?

http://stackoverflow.com/questions/519233/writing-to-a-textbox-from-another-thread

true WindowsFormsApplication1.Form1.ActiveForm.Text hi. Am I going about this completely wrong UPDATE Here is the working..

Get url parameters from a string in .NET

http://stackoverflow.com/questions/659887/get-url-parameters-from-a-string-in-net

have to find some regexy way of splitting it up. Am I missing something obvious or is there no built in way to do..

Nullable types and the ternary operator: why is `? 10 : null` forbidden? [duplicate]

http://stackoverflow.com/questions/858080/nullable-types-and-the-ternary-operator-why-is-10-null-forbidden

there is no implicit conversion between int and null . Am I going nuts c# .net nullable conditional operator share..

Use own IComparer<T> with Linq OrderBy

http://stackoverflow.com/questions/985657/use-own-icomparert-with-linq-orderby

compare method. But my list is still sorted the wrong way. Am I missing something I have no clue. c# linq sql order by icomparer..

How do I generate an alert at a specific time in C#?

http://stackoverflow.com/questions/1297109/how-do-i-generate-an-alert-at-a-specific-time-in-c

time For example say I want to generate an alert at 8 00 AM that informs me its 8 00 AM or an event that informs me of the.. to generate an alert at 8 00 AM that informs me its 8 00 AM or an event that informs me of the current time at any given.. Use the System.Threading.Timer class var dt ... next 8 00 AM from now var timer new Timer callback null dt DateTime.Now TimeSpan.FromHours..

How to tell whether a point is to the right or left of a line

http://stackoverflow.com/questions/1560492/how-to-tell-whether-a-point-is-to-the-right-or-left-of-a-line

question Use the sign of the determinant of vectors AB AM where M X Y is the query point position sign Bx Ax Y Ay By Ay..

Two-way binding of Xml data to the WPF TreeView

http://stackoverflow.com/questions/188001/two-way-binding-of-xml-data-to-the-wpf-treeview

dfbe 4878 9d91 1a9f1a7696b0 created 5 14 2004 1 05 10 AM updated 5 14 2004 1 07 41 AM forest name A forest node guid.. created 5 14 2004 1 05 10 AM updated 5 14 2004 1 07 41 AM forest name A forest node guid b441a196 7468 47c8 a010 7ff83429a37b.. 7468 47c8 a010 7ff83429a37b created 01 01 2003 1 00 00 AM updated 5 14 2004 1 06 15 AM data CDATA A forest node This is..

Quartz.net setup in an asp.net website

http://stackoverflow.com/questions/3245975/quartz-net-setup-in-an-asp-net-website

to call SendMail once in a day at a given time say 6.00 AM using quartz.net... I dont know how to get started Should i..

What indicates an Office Open XML Cell contains a Date/Time value?

http://stackoverflow.com/questions/4730152/what-indicates-an-office-open-xml-cell-contains-a-date-time-value

'mm dd yy' 15 'd mmm yy' 16 'd mmm' 17 'mmm yy' 18 'h mm AM PM' 19 'h mm ss AM PM' 20 'h mm' 21 'h mm ss' 22 'm d yy h mm'.. mmm yy' 16 'd mmm' 17 'mmm yy' 18 'h mm AM PM' 19 'h mm ss AM PM' 20 'h mm' 21 'h mm ss' 22 'm d yy h mm' 37 '# ##0 # ##0..

Is the size of a Form in Visual Studio designer limited to screen resolution?

http://stackoverflow.com/questions/6651115/is-the-size-of-a-form-in-visual-studio-designer-limited-to-screen-resolution

Bug Tracking Posted by Microsoft on 10 9 2008 at 12 18 AM Thanks for your feedback on the .NET Framework The issue that..