is it possible to create a new alias for a given namespace for the entire project?
that is i dont want to write a "using DO = App.Do.App33;" in each cs file of the project.
but i want to do it one time in some configuration or maybe in some cs file.
and then simply DO will refer to App.Do.App33 in the entire Application.
...
I've got a background worker on a form and I've written some long running DB interaction in it.
When I click a button on my form, the following runs:
if (!bwFind.IsBusy)
bwFind.RunWorkerAsync(param);
Where bwFind is the BackgroundWorker and param is a DevExpress CriteriaOperator.
I update a progressbar in the Progress_Changed e...
Is it possible to add user-defined properties to the My.Application or My.User objects?
I've got some properties defined currently that tell me what environment the app is running in (i.e. "Development", "Testing", "Production", etc.), whether the user is an administrator, etc. It would seem logical to get this info from something like ...
Hello all,
I have a .NET application and I would like to create a bug in bugzilla database from my application.
I have found a C# proxy for this purpose which is using WebService interface of Bugzilla.
Unfortunately, it does not work for me and I get connection timeout error.
Any help would be appreciated.
Casal
...
I am trying to find a way to determine the total and available disk space in an arbitrary folder from a .NET app. By "total disk space" and "available disk space" in a folder I refer to the total and available disk space that this folder would report if you performed a "dir" command on it, that is, the total and available disk space of t...
i have a database of country table. sql 2005 like,
country_id country_name region area population gdp status
84 indi asia 3432 3423 343 Active
85 U.k Europe 43432 3243 2343 Inactive
I want to user image of active and inactive in...
Background
I've been contracted to analyze an existing Data Provider and I know the following code is faulty; but in order to point out how bad it is, I need to prove that it's susceptible to SQL injection.
Question
What "Key" parameter could break the PrepareString function and allow me to execute a DROP statement?
Code Snippet
P...
I have a multithreaded app that uses sqlite. When two threads try to update the db at once i get the exception
Additional information: The database file is locked
I thought it would retry in a few milliseconds. My querys arent complex. The most complex one (which happens frequently) is update, select, run trivial code update/delete, c...
I'm using the DevExpress Xtra TreeList control to display a hierarchical set of questions and responses - think of a complex survey form, containing sections, subsections and a variety of questions.
The form is working in unbound mode, with no dataset nor any databinding.
As a part of the information displayed for each question, some ...
I am sure there is a clever way to handle this, but I just can't get it right in my head. Here is the scenario:
I have a base class with about 30 properties. Say that I have a property on this class called Type. For a subset of the instances of this class, I want to add a few more properties based on the Type property. In this case...
Is there any way to get the value of a SecureString without comprising security? For example, in the code below as soon as you do PtrToStringBSTR the string is no longer secure because strings are immutable and garbage collection is non-deterministic for strings.
IntPtr ptr = Marshal.SecureStringToBSTR(SecureString object);
string valu...
We currently have a SVN repository that we store our sourcecode in. We have a large range of projects in there (hundreds) and multiple common libraries etc.
It all works quite well but it's non-standard in structure. Initially we were aiming for the standard "Trunk\", "Tags\Tag_1.0.0\" style model but the problem we had was that the rel...
I'm fiddling with a project where the CLR is hosted within a C application. Is there a supported way to unlink the CLR and relaunch it?
...
I'm trying to play around with UPnP. Specifically, I'm trying to browse the content library of a PS3 Media Server.
I tried upnp.dll (a COM library that ships with windows) and found it easy to use. I can discover devices and look at their services pretty easily, however it throws an exception when trying to access the services of the m...
I have a string that looks like this:
var expression = @"Args("token1") + Args("token2")";
I want to retrieve a collection of strings that are enclosed in Args("") in the expression.
How would I do this in C# or VB.NET?
...
While using ADO.NET (maybe i am wrong, i dont know what its called) i notice that i can only begin a transaction with a connection and a command seems to have command.Transaction which gets me the transaction data but doesnt start a transaction itself? Actually while looking i see this in System.Data.SQLite
// Summary:
// The tr...
I am refactoring an old program to use VS2008 (instead of VS2005) and the 2003 Crystal Reports merge modules no longer work on the client machine.
I am using the CR version bundled with VS2008. Neither the CR10 merge modules downloaded from the SAP site work, nor the CR x86 msi.
Could not load file or assembly 'CrystalDecisions.Windo...
Hi,
I'd like to write an application that reads USB MIDI data from my midi piano and quite possibly anything else MIDI I can find.
Looking for a library that works with .NET and also allows me to 'intercept' this data even if another application is using the MIDI.
Thanks
...
It's a common sense when you are developing a big silverlight application that break it into many small components, to make the original XAP file relatively small and dynamically load the necessary DLLs from the server side on demand.
An easy way is to download(From WebClient) the dll in the program in the runtime accroding to the URL s...
Base Class B
|
|
----
| |
| |
D1 D2
public static object GetDerivedClass(Type t1, MyProcess p1)
{
DerivedClass D1 = null;
DerivedClass D2 = null;
if (t1 is typeof(Derived)
{
Process(D1,p1);
return D1;
}
else if(t1 is typeof(Derived)
{
...