.net

Is C# in English universally?

Does the C# language localize for people that have their machine's set to some language other than English? In other words, is C# always unconditionally written in English? ...

drag files or folders in textbox? C#

How do i drag files or folders into a textbox? i want to put the foldername in that very textbox. C# .NET ...

Pros and Cons of developing/using Attribute Classes to handle exceptions in a .NET Code?

Hi all, I would like to pose a question about developing and using attribute classes in your code. I'm quite a newbie in developing attribute classes (it is an uncharted territory on my book!), and was thinking of creating an attribute class that will handle exceptions in methods instead of coding a try/catch() method in each method or...

What are some good .net job scheduler and runner solutions?

I am looking for a solution, or a set of solutions with the following components: Job Scheduler - run a specific job on a specific schedule. I have seen Quartz.NET and it seems like a good framework, however I have not found it to have integrations with the components that follow. Job Runner - run a job, loaded as an AppDomain, from a ...

Implementing a timeout on a function returning a value

I have a function that calls out a read or write request on a serial port and then returns the value that was read. I am using Commstudio express (I'm implementing a class from Commstudio) , but it's timeout features don't appear to work at all, so I'm trying to implement my own timeout. Currently I have a timer that is set upon request ...

How to modify an assembly's version number after build?

I have an assembly that is already built, but I need to modify it's version number. Is there a way to do this without recompiling? ...

Combining properties made available via webservices profile service aspnet

I really wasn't sure what the title for my question could be, so sorry if it's a bit vague. I'm working on an application that uses client application services for authentication/profile management etc. In web.config for my website, I have the following profile properties like this: <properties> <add name="FirstName" type="string" ...

Why Nullable<int> can't compile but int? do without 'using System;'

namespace ns { class Class1 { Nullable<int> a; } } will not compile: The type or namespace name 'Nullable' could not be found (are you missing a using directive or an assembly reference?) <-- missing 'using System;' but, namespace ns { class Class1 { int? a; } } will compile! (.Net 2) do you...

How to validate a Regular Expression?

I'm developing an application in .NET where the user can provide Regular Expressions that are afterwards used to validate input data. I need a way to know if a regular expression is actually valid for the .net regex engine. Thanks for any help ...

Where i put the Connectionstring with numerous client?

Hi everybody, i will develop utility program for a company with more than 1000 client and the program must be win application with .Net because my program will act with another program. What is your suggest for place of app.config? one scenario: We put the app.config on the server that configured once and write a windows service for it t...

SQL Server and .NET: insert fails (silently!) in code but not when run manually

My insert stored procedure: ALTER procedure proj_ins_all ( @proj_number INT, @usr_id INT, @download DATETIME, @status INT ) as INSERT INTO project (proj_number, usr_id, date_download, status_id) VALUES (@proj_number, @usr_id, @download, @status) select SCOPE_IDENTITY() ... runs fine when called manually like so: exec proj_ins_al...

Date.TryParseExact - What is the provider parameter used for?

The method signature for Date.TryParse is: Public Shared Function TryParseExact ( _ s As String, _ format As String, _ provider As IFormatProvider, _ style As DateTimeStyles, _ <OutAttribute> ByRef result As DateTime _ ) As Boolean I understand what format does, but what is the provider parameter for? I understand ...

One entity object for many entity models

Hi, it's possible to have one entity object (class, e.g. User) for more entity models (EDMX)? I have two datamodels in which i want to share user tables. ...

How to cancel RadioButton or CheckBox checked change

Is there any way to cancel a RadioButton or CheckBox's change in state before it changes? I was hoping for a simple event like CheckedChanging or BeforeCheckedChange. I really want to avoid listening for mouse clicks and key presses. But if you know of a proven reliable way of using mouse clicks and key presses, please explain it. I'm...

Where to place clientaccesspolicy.xml in Silverlight project

I have a Silverlight application on the client communicating with the server side through WCF. I keep getting a CommunicationException occasionally - and in particular when passing larger amounts of data to some parameters of the service. I have been told that if I want the Silverlight application to communicate with a server like this I...

In-memory database available across AppDomain boundary.

Dear ladies and sirs. I wonder if there is an in-memory database implementation, where the same in-memory database instance can be used across multiple AppDomains. The motivation. Like many folks out there, we have integration tests for our client-server application. There are several test modes, from the most heavy one - the real life...

How to debug *Invoke() in Visual Studio 2008

I have a problem debugging Invoke() or BeginInvoke() in Visual Studio 2008. For instance in the code below the debugger breaks on the Invoke() call. I would have liked it to break on Console.WriteLine(p.ToString()); because that is where an exception is thrown. In code as simple as this this is not that much of a problem but it can get ...

StyleCop and FxCop rules exclude each other

I'm using StyleCop and FxCop tools to improve my code but I came to a place where there are two rules, one in StyleCop and one in FxCop that exclude each other. If I fix my code to match the rule from StyleCop then FxCop validation fails and vice versa. First rule is SA1200 from StyleCop which says that all using directives must be plac...

Making XSLT language independent

In my web application, I display the search results using XSLT. There are some hard coded text in XSLT file which I want to make language independent. XSLT: <xsl:if test="$IsEmpty"> <table cellpadding="5" cellspacing="0" border="1" style="width:100%;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-...

Finding xml file in a solutionexplorer

i have a big solution containing that much projects..i need to find a specific xml file in that solution example "sample.xml".Using ctrl+shift +F we cant find the specific xml file ..Is there any shortcuts for finding xml file in solution explore ...