.net

How does a manifest file work in .NET apps?

Hi, I was using ANTS Profiler 4 and started it without admin rights in Vista. The app threw a dialog box asking whether I want to create a manifest file so that the application always launches with admin rights (it needs it to function fully). How would a manifest file look like? Will it persist something like "AdminRights = true", whi...

c# convert dateTime to ISO format yyyy-mm-dd hh:mm:ss

Hi, Is there a standard way in .Net C# to convert a datetime obj to ISO format yyyy-mm-dd hh:mm:ss? Or do I need to do some string manipulation to get the date string? Any advice appreciated. ...

Installing Silverlight plugin on offline PC - is it possible?

Let's presume you need to show your shiny new touchscreen-optimised Silverlight application to your boss during trans-atlantic flight. How can you do that on his notebook if the only thing you have is CD containing your application and (maybe) your trusty 4" pocket notebook without mouse controls (:)) but with silverlight plugin install...

using localizable property method versus ResXResourceSet method

Can anyone tell me what is more appropriate for different types of .net applications? ...

.net c sharp executeScalar() OR executeNonQuery()

I am running SP which does not return any rows or data , than in that case which is more efficient executeScalar() or executeNonQuery() ...

How do i detect the provider from a user-specified connectionstring?

My application needs to do a certain query against a user-specified connectionstring. The query will need some parameters, so I was thinking of using the DbProviderFactory , in combination with myConnection.GetSchema("DataSourceInformation").Rows[0]["ParameterMarkerFormat"] to find out if I need to use :(Oracle), @(Sql) or ?(OleDb) to s...

Windows service start order causes faulted state in WCF Service

I have a WCF service hosted as a Windows service. The WCF service uses msmq queue on the same server. When the server is restarted my WCF service starts before the msmq service. This puts my WCF service in faulted state. What is the best way to handle this? Should I set up a dependency to the msmq service? Is there a way to handle this...

Thread.Start() vs BackgroundWorker

what is the difference between create thread using thread.start and using background worker ? ...

Balloon class in c#.net for winforms

Is there any balloon class in c#.net using winforms ?? ...

What math methods are implemented in fpu hardware with .net?

Does anyone know what math methods are implemnted by the hardware of the processor for .net? For example, I have an algorithm that makes a lot of use of atan. I can easily write a lookup table for this, but if math.net implements this using an fpu or other hardware extensions, it's not going to be worth it. ...

is there a way to continue an exception in c#?

When an unexpected exception occurs in your program (in the debugger). Sometimes you just want to skip it since killing the program at that point is more harmful than continuing. Or you just want to continue since you were more interested in another error/bug Is there an option/compilerflag/secretswitch to enable this? I understand exc...

servicecontroller permissions

I have written a service which a website can execute a command on remotely using the ExecuteCommand method. I have noticed that if the website is not running under a user that is an admin on the remote machine then I get a permission denied exception on trying to execute command. The servicecontroller class doesn't even allow you to sp...

Better obfuscating in Visual Studio for solutions with many projects?

I have a solution with many projects, which leads to many dll files. My question is, is this an obstacle when obfuscating and should I optimize this in some way? Or it is just a matter of public/private fields/methods? ...

Control PointToClient() vs PointToScreen()

The MSDN does not provide, IMHO, a clear difference between Control.PointToScreen(link) and Control.PointToClient(link) methods. Is there somebody who could explain in a few simple words what is the difference between these methods. Especially is unclear for me the notion of "Client". I understand PointToScreen the real screen coordina...

XML Mapping - XSLT or Code?

I have had a number of discussions recently over whether to use XSLT or code to write mapping functionality from one XML format to another or even when converting to something other than XML. Now I am of the mindset that XSLT's purpose is exactly for this type of thing and would be the most suitable option. However, other people are su...

LINQ query to detect duplicate properties in a list of objects

I have a list of objects. These objects are made up of a custom class that basically contains two string fields (String1 and String2). What I need to know is if any of these strings are duplicated in that list. So I want to know if "objectA.String1 == objectB.String1", or "ObjectA.String2 == ObjectB.String2", or "ObjectA.String1 == Objec...

Determine what interfaces a type implements

Hey guys Just a quick one... How do I determine what interfaces a type implements? Cheers Anthony ...

Registry GetValue function .

Hello all I am trying to get values and set values to the Registry . When I am trying to access a path that not located at the registry I am getting exaption . But when i am setting that path with Registry.SetValue(keyName, "", 0);, all works fine and I can get non existing values from it . Any idea why i can't use my public int G...

Automate Builds in .net

Hi all, I have a solution sln, with 50 projects (vbproj, csproj, and setup project). I need automatize Build of all solution, and projects (set of projects of solution folder), and setup project (vdproj). My vdproj (setup project) has Post Build Event.. First, how can I automatize build for vdproj ?? I only can execute a command for ...

Create element in background thread an then add to main-interface.

Hello, i have a problem with threading in WPF. I want to have created a complex user interface and then i want to add it to my main-window. While this complex user interface is creating i want to show a progress bar in my main window. I think this only could be made with threads. But there is a problem. The created element can't be adde...