¡@

Home 

c# Programming Glossary: he

How do I kill a process using Vb.NET or C#?

http://stackoverflow.com/questions/116090/how-do-i-kill-a-process-using-vb-net-or-c

do I kill a process using Vb.NET or C# I have a scenario where I have to check whether user has already opened Microsoft.. using Vb.NET or C# I have a scenario where I have to check whether user has already opened Microsoft Word. If he has.. Vb.NET or C# I have a scenario where I have to check whether user has already opened Microsoft Word. If he has then I..

Why cannot C# generics derive from one of the generic type parameters like they can in C++ templates? [duplicate]

http://stackoverflow.com/questions/1842636/why-cannot-c-sharp-generics-derive-from-one-of-the-generic-type-parameters-like

cannot C# generics derive from one of the generic type parameters like they can in C templates duplicate.. derive from one of the generic type parameters like they can in C templates duplicate This question already has an.. C templates duplicate This question already has an answer here Inheritance on a constrained generic type parameter ..

Hash and salt passwords in C#

http://stackoverflow.com/questions/2138429/hash-and-salt-passwords-in-c-sharp

on Hashing User Passwords . Really I can't get what he is trying to achieve. Here is his code private static string.. buff Return a Base64 string representation of the random number. return Convert.ToBase64String buff private static.. salt string saltAndPwd String.Concat pwd salt string hashedPwd FormsAuthentication.HashPasswordForStoringInConfigFile saltAndPwd..

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

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

is the C# &ldquo as&rdquo operator so popular closed In development.. cast T x . If you are not sure you can use as but need to check for null before performing some operation. All that the above.. check for null before performing some operation. All that the above code does is to turn a useful InvalidCastException into..

How to create a simple proxy in C#?

http://stackoverflow.com/questions/226784/how-to-create-a-simple-proxy-in-c

in C# I have downloaded Privoxy few weeks ago and for the fun I was curious to know how a simple version of it can be.. of it can be done. I understand that I need to configure the browser client to send request to the proxy. The proxy send.. I need to configure the browser client to send request to the proxy. The proxy send the request to the web let say it's a..

C# generic constraint for only integers

http://stackoverflow.com/questions/32664/c-sharp-generic-constraint-for-only-integers

constraint for only integers Can anyone tell me if there is a way with c# generics to limit a type T to only Int16.. only Int16 Int32 Int64 UInt16 UInt32 UInt64 I'm aware of the where keyword but can't find an interface for only these types.. Int16 Int32 Int64 UInt16 UInt32 UInt64 I'm aware of the where keyword but can't find an interface for only these types Something..

Benefits of using the conditional ?: (ternary) operator

http://stackoverflow.com/questions/3312786/benefits-of-using-the-conditional-ternary-operator

of using the conditional ternary operator I'm currently a student in college.. I'm currently a student in college learning and for the most part enjoying the wonderful world of programming. I'm lucky.. in college learning and for the most part enjoying the wonderful world of programming. I'm lucky enough to know about..

IIS Express enable external request

http://stackoverflow.com/questions/3313616/iis-express-enable-external-request

in IIS Express Scott Guthrie wrote that is possible but he didn't say how. c# iis share improve this question There's.. didn't say how. c# iis share improve this question There's a blog post up on the IIS team site now explaining how to.. share improve this question There's a blog post up on the IIS team site now explaining how to enable remote connections..

Ignoring accented letters in string comparison

http://stackoverflow.com/questions/359827/ignoring-accented-letters-in-string-comparison

to compare 2 strings in C# and treat accented letters the same as non accented letters. For example string s1 hello string.. the same as non accented letters. For example string s1 hello string s2 héllo s1.Equals s2 StringComparison.InvariantCultureIgnoreCase.. s1.Equals s2 StringComparison.OrdinalIgnoreCase These 2 strings need to be the same as far as my application is..

windows service (allow service to interact with desktop)

http://stackoverflow.com/questions/4237225/windows-service-allow-service-to-interact-with-desktop

with desktop How with code enabled in Windows service check box allow service interact with desktop c# windows services.. this question I'm going to take some liberties in here in trying to interpret your question from keywords. In the.. in trying to interpret your question from keywords. In the future please spend more time writing your questions so that..

Main method code entirely inside try/catch: Is it bad practice?

http://stackoverflow.com/questions/4827628/main-method-code-entirely-inside-try-catch-is-it-bad-practice

do this just in case any exceptions manage to slip out of the rest of the program logic thus allowing me to do something about.. in case any exceptions manage to slip out of the rest of the program logic thus allowing me to do something about it such.. try catch block without a good reason is bad practice. In the .NET programming model exceptions should be reserved for truly..

Proper use of the IDisposable interface

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

use of the IDisposable interface I know from reading the MSDN documentation.. use of the IDisposable interface I know from reading the MSDN documentation that the primary use of the IDisposable interface.. I know from reading the MSDN documentation that the primary use of the IDisposable interface is to clean up unmanaged..

What is the difference between const and readonly?

http://stackoverflow.com/questions/55984/what-is-the-difference-between-const-and-readonly

is the difference between const and readonly What is the difference.. is the difference between const and readonly What is the difference between const and readonly and do you use one over.. between const and readonly and do you use one over the other c# .net const constants readonly share improve this..

How to elevate privileges only when required?

http://stackoverflow.com/questions/573086/how-to-elevate-privileges-only-when-required

to elevate privileges only when required This question applies to Windows Vista I have an.. which normally works without administrative privileges. There is one activity which does need administrative privilege but.. need administrative privilege but I don't want to start the application itself with higher privileges when I know most of..

Watermark in System.Windows.Forms.TextBox

http://stackoverflow.com/questions/578193/watermark-in-system-windows-forms-textbox

in System.Windows.Forms.TextBox What is he best way to implement Watermark functionality for a System.Windows.Forms.TextBox.. in .Net 2.0 with C# Edit Using the ready made component from CodeProject was very easy. It's also.. from CodeProject was very easy. It's also with a The Code Project Open License CPOL . c# .net .net 2.0 watermark..

Programming P2P application

http://stackoverflow.com/questions/8523330/programming-p2p-application

custom p2p program that runs on port 4900. In some cases when the person is behind a router this port is not accessible from.. p2p program that runs on port 4900. In some cases when the person is behind a router this port is not accessible from the.. is behind a router this port is not accessible from the internet. Is there an automatic way of enabling the access to..

Best way to really grok Java-ME for a C# guy [closed]

http://stackoverflow.com/questions/90578/best-way-to-really-grok-java-me-for-a-c-sharp-guy

closed I've recently started developing applications for the Blackberry. Consequently I've had to jump to Java ME and learn.. jump to Java ME and learn that and its associated tools. The syntax is easy but I keep having issues with various gotchas.. is easy but I keep having issues with various gotchas and the environment. For instance something that surprised me and wasted..

Web app blocked while processing another web app on sharing same session

http://stackoverflow.com/questions/9426673/web-app-blocked-while-processing-another-web-app-on-sharing-same-session

app blocked while processing another web app on sharing same session Deployed two WebApplications.. TravelDesk. Both WebApps are sharing session via AspState the config information are sessionState allowCustomSqlDatabase true.. 720 A user is logged in an HRMS Application from that he is navigating into TravelDesk application on a new Window the..

What is quicker, switch on string or elseif on type?

http://stackoverflow.com/questions/94305/what-is-quicker-switch-on-string-or-elseif-on-type

switch on string or elseif on type Lets say I have the option of identifying a code path to take on the basis of a.. I have the option of identifying a code path to take on the basis of a string comparison or else iffing the type Which is.. take on the basis of a string comparison or else iffing the type Which is quicker and why switch childNode.Name case Bob..

Distinct() with lambda?

http://stackoverflow.com/questions/1300088/distinct-with-lambda

inline embarass me Update I found a reply by Anders Hejlsberg to a post in an MSDN forum on this subject. He says The.. Hejlsberg to a post in an MSDN forum on this subject. He says The problem you're going to run into is that when two objects..

Detecting Client Death in WCF Duplex Contracts

http://stackoverflow.com/questions/1427926/detecting-client-death-in-wcf-duplex-contracts

will be thrown on the service channel. He recommends adding a Connect and Disconnect method to the service..

Resources for 2d game physics [closed]

http://stackoverflow.com/questions/165404/resources-for-2d-game-physics

way. c# f# 2d physics share improve this question Here are some resources I assembled a few years ago. Of note is.. of motion constraints rigid body physics and on and on. He includes well documented source code all the way through. Physics..

Filetype association with application (C#)

http://stackoverflow.com/questions/222561/filetype-association-with-application-c

I spoke of global associations in the previous paragraph . He also mentioned mentioned why going there is not overly advisable...

How to create a simple proxy in C#?

http://stackoverflow.com/questions/226784/how-to-create-a-simple-proxy-in-c

read the HTTP header and see the request he must executes. He executes the request. Step3 The proxy receive an answer from..

C#. Struct design. Why 16 byte is recommended size?

http://stackoverflow.com/questions/2407691/c-struct-design-why-16-byte-is-recommended-size

recommendations on development and design of .NET apps . He says that good designed struct has to be less than 16 bytes..

ObservableCollection that also monitors changes on the elements in collection

http://stackoverflow.com/questions/269073/observablecollection-that-also-monitors-changes-on-the-elements-in-collection

not with the element when the a contained element changes. He suggested declaring a PropertyChanged event on the class marked..

Compiling Quantlib via SWIG for C#

http://stackoverflow.com/questions/3334011/compiling-quantlib-via-swig-for-c-sharp

that this is any issue with the code in SVN which I used . He suggested that the QuantLib SWIG 1.0.zip bindings should be..

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

dog 2 etc Puppies puppy A puppy B etc There is one person. He has 1..n dogs. Each dog has 1..n puppies. I want a list of all..

Is the ++ operator thread safe? [duplicate]

http://stackoverflow.com/questions/4628243/is-the-operator-thread-safe

one of Eric Lippert's awesome answers on what i does . He says this is what really happens x is evaluated to produce the..

What Advantages of Extension Methods have you found? [closed]

http://stackoverflow.com/questions/487904/what-advantages-of-extension-methods-have-you-found

you don't own control the source to the original object. He brought up Why not just add a method to your own class We've..

Filtering DataGridView without changing datasource

http://stackoverflow.com/questions/5843537/filtering-datagridview-without-changing-datasource

an exception Unable to cast object DataView to DataSet He can do that as he designed DataGridView with DataSet and DataMember..

How can I send a file document to the printer and have it print?

http://stackoverflow.com/questions/6103705/how-can-i-send-a-file-document-to-the-printer-and-have-it-print

I send a file document to the printer and have it print Here's the basic premise My user clicks some gizmos and a PDF file.. SendToPrinter filePath Something like this He will do this process many times. For each student in a classroom..

POCO vs DTO

http://stackoverflow.com/questions/725348/poco-vs-dto

comes from POJO coined by Martin Fowler anecdote here . He used the term POJO as a way to make it more sexy to reject the.. of a DTO for an example of the use of this pattern. Here's the difference POCO describes an approach to programming..

How do you convert a string to ascii to binary in C#?

http://stackoverflow.com/questions/736533/how-do-you-convert-a-string-to-ascii-to-binary-in-c

make a simple application to convert a string to binary. He gave me the following code sample void ToBinary char str char.. this question This is very easy to do with C#. var str Hello world With LINQ foreach string letter in str.Select c Convert.ToString..

Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? [closed]

http://stackoverflow.com/questions/84340/why-learn-perl-python-ruby-if-the-company-is-using-c-c-sharp-or-java-as-the

files and you had to look in them to see what they were. He did this task by hand....A Java C# program would have saved.. in Perl Python Ruby probably would have been worth it. He spent several hours doing it. It would have taken less than..

Business Objects, Validation And Exceptions

http://stackoverflow.com/questions/88541/business-objects-validation-and-exceptions

work of Paul Stovell concerning data validation. He summed up his ideas at one time in this article . I happen to.. on the matter which I implemented in my own libraries . Here are in Paul's words the cons to throwing exceptions in the..

Changing the user agent of the WebBrowser control

http://stackoverflow.com/questions/937573/changing-the-user-agent-of-the-webbrowser-control

need to add a COM reference to œMicrosoft Internet Controls He mentions your approach too and states that the WebBrowser control..

What is ?œOutbound Transaction??in layman terms?

http://stackoverflow.com/questions/9631349/what-is-outbound-transaction-in-layman-terms

recently client explained the new system environment. He used the word œoutbound transaction Due to time limitations I..