I am creating a Windows Mobile Application in C# and Visual Studio 2008.
The application will have 5-6 main 'screens'. There will also be bar (/area) with information (e.g. a title, whether the app is busy, etc) above the screens, and a toolbar (or similar control) below the screens with 5-6 buttons (with images) to change the active sc...
Normally I use the below code, but is there a better way?
lastOfMonth = new DateTime(Now.Year, Now.Month, 1).AddMonths(1).AddDays(-1)
...
We have a cluster of window services that acts as a "hub". These services will consume a number of 3rd party web services. Currently we have maxConnection set to 20. However, there are times when the services are handling more then 20 concurrent requests each and any calls to external web services will be dropped.
Is there anything w...
I've created a small executable that can be launched either as a normal application by calling MyApp.exe or as a service by calling MyApp.exe -s. Because I'm trying to keep as simple as possible, I "install" this app by manually running
sc create MyAppService binPath= "C:\MyApp\MyApp.exe -s"
Then I start the service with net start My...
[All of the following was tested using Visual Studio 2008 SP1]
In C++, const qualification of parameter types does not affect the type of a function (8.3.5/3: "Any cv-qualifier modifying a parameter type is deleted")
So, for example, in the following class hierarchy, Derived::Foo overrides Base::Foo:
struct Base
{
virtual void Fo...
Hello everyone I am trying to cast two objects to, both, a specific type based on property reflection information. I want to do this dynamically so I don't need a bunch of switch cases and such for each type that the two objects can be in this class. Overall they will mostly be int or float. At the moment I currently tried using 'var' an...
We're writing an SDK for a CAD program and have run into a slight disagreement regarding a specific type of function (not just disagreement between different people, also disagreement between my two brain-halves).
Imagine there's a lot of classes for specific curve types (ellipse, circle, arc, line, bezier etc.). All of these classes ca...
We have an Adobe Flex client talking to a .NET server using WebORB. Simplifying things, on the .NET side of things we have a struct that wraps a ulong like this:
public struct MyStruct
{
private ulong _val;
public override string ToString()
{
return _val.ToString("x16");
}
// Parse method
}
And a class:
...
I am looking at a design pattern which has come up in quite a few of my firm's projects. It has historically functioned correctly, however I have heard some other developers argue that there is a possibility of session corruption using this pattern. I'm looking for insight from other .NET developers here on Stack Overflow.
Basically, t...
When discussing sealed classes, the term "virtual function table" is mentioned quite frequently. What exactly is this? I read about a method table a while ago (I don't remember the purpose of the purpose of this either) and a google/search on here brings up C++ related results.
Thanks
...
This is probably a simple one but I can't seem to figure it out.
I have a bunch of form items created by the form designer declared as (in frmAquRun.Designer.vb)
Public WithEvents btnAquRunEvent1 As VisibiltyButtonLib.VisibilityButton
Public WithEvents btnAquRunEvent2 As VisibiltyButtonLib.VisibilityButton
... etc
And I basically wa...
Hi all,
I need to build a system that generates reports on data exceptions (e.g. this value is stale because it hasn't been updated in x days). Once they have a daily report on data quality issues my users would like to have a bunch of filtering capability (with customizable public and private filters) and then be able to categorize and...
Hello, I am wondering what the uses of C++/CLI is. It seems to me that it is basically C++ running on .Net, am I wrong in this thinking? What is it good for? Why not just use C# or some other truly managed language instead?
...
I always wondered why/what would be a benefit in moving to VS 2008 or vs 2010 from VS 2005 ,
What would be in it for a company that has invested a lot in having code in VS 2005 to move to 2008 or 2010. I know the benefits of the framework and new features, but how do I sell one an idea to move to the Latest framework?.
...
I'm using a non-threadsafe event API. wait() is called, and from that call, event handlers are dispatched. I want to be able to, within an event handler, "sleep" for some time. Currently, I have a scheduler that schedules functions to be called at a later time, and have a bit of a hack that lets me use Scheduler.Sleeper(some_ienumerator)...
Hello guys.
I'm having some weird trouble with a project on VS2005.
I have a few user settings configured, but every time i start the project (on release mode) it comes with a previously tested configuration.
I've tried synching it many times, but i cannot succeed. Most of these properties are empty strings by default. I have a instal...
Ajax seems to give a better user experience, but I'm not so sure if I take the right steps to protect and secure my application.
Is there a checklist of things I must pay attention to?
...
I have some C# class libraries, that were designed without taking into account things like concurrency, multiple threads, locks, etc...
The code is very well structured, it is easily expandable, but it can benefit a lot from multithreading: it's set of scientific/engineering libraries that need to perform billions of calculations in ve...
I've been making heavy use of the interactive 3D controls, made by some guys on the WPF team, found here http://channel9.msdn.com/posts/Charles/Daniel-Lehenbauer-and-Kurt-Berglund-Interactive-2D-controls-on-WPF-3D-Surfaces/
I've noticed there hasn't been any updates to this lately, and with WPF and .Net 4.0 just around the corner, I wa...
Hi,
The "WebClient" class (and ClickOnce also) can use default proxy settings (e.g. put in application.config), however:
Where does the username / password come from? (I can't see a setting in the XML config - see below).
Can the application be configured to manual prompt the user for the username/password
http://msdn.microsoft.co...