A bit of an odd question and probably backwards from what most people want to do, but I'm trying to work around a legacy COM issue.
I have two components, both of which are actually .NET assemblies, but for historical reasons one is loading the other as a COM object (the assembly is registered for COM Interop). It's a plug-in architectu...
I did ask whether this was possible in VS 2008 which was answered in http://stackoverflow.com/questions/1296840/read-and-step-into-net-framework-source-code.
However my problem is that I am using 2005 and not 2008.
Does anyone know whether this is possible please??
The reason I want to do this is to better understand C# paradigms.
Wit...
I'm using the NMS API for reading/writing ActiveMQ in C#, and I cannot find a way to preview the messages on a queue. I could read and rollback - but that'll make them DLQ eventually.
In my previous life, TIBCO had a QueueBrowser object that could be used, and I think JMS had IQueueBrowser as well. I cannot find an ActiveMQ .NET equiv...
I should probably know this already, but I'm not sure and I don't see it documented.
I use System.Diagnostics.Debug.WriteLine quite often during the development process to be able to track changes to variables or exceptions as I'm debugging the code. This is meant to make development and understanding what's happening easier only durin...
I'm testing my existing apps in VS 2010, and ran into my first break. ASP.NET AJAX authentication support has changed.
Sys.Services.AuthenticationService.set_defaultLogoutCompletedCallback(OnLogoutCompleted);
This no longer works. "Sys" is defined, but "Sys.Services" is an undefined object. Does anyone have a quick pointer to the repl...
I'm writing a small ASP.Net custom control inheriting from CompositeControl. The control is just a panel containing two subpanels with a label in each subpanel. When rendered, I am seeing in the HTML source that the first child control of my custom control gets two id attributes - the first being the id of the custom control itself and...
I am working with a 3rd party web testing API which has a Src property for image.
What I need to do is say:
if (t is HtmlImage) { // Do cast here. } // t is a variable of type T (my generic).
However, my cast does not work. The cast is as follows:
Controls.HtmlImage img = (Controls.HtmlImage)t;
This gives an error stating that I c...
I would like to discard the remaining characters (which can be any characters) in my string after I encounter a space.
Eg. I would like the string "10 1/2" to become "10";
Currently I'm using Split, but this seems like overkill:
string TrimMe = "10 1/2";
string[] cleaned = TrimMe.Split(new char[] {' '});
return string[0];
I feel the...
Can anybody tell me how to get servers domain name in asp.net? (Environment.UserDomainName returns "IIS APPPOOL" string)
Thanks for replays, but mostly they are about DNS name of the server, what I need is the domain name. For example when I login via windows authentication I type domain\user and I need this "domain"
...
I am developing a GUI application in C# using the design mode in VS2008. Now that I am finished with the looks of the application I am ready to add some functionality to it.
What really confuses me though, is that VS2008 designer only uses the empty constructor. When developing applications in Java I normally pass around a model and con...
Hi- I'm running a stored procedure through L2S and it's returning 'Specified cast is not valid'. The stored proc is returning data when ran manually and when I step thru it, everything is fine until it tries to create the row object in "foreach (var row in result)".
var q = new db();
var result = q.GetNearbyLocations(latitude, longitude...
I have an embedded scripting engine in my C# application that uses IronPython 2. I create the Python runtime and add a few classes to the global namespace so that the script can import them as modules.
However, one (pretty basic) thing I can't figure out is how to send script arguments. I realize that I could just create a variable with...
i have lots of data like this
1:0x00a4c7d9fb3849...
2:0x79821309bd789c7689c97...
3:0x0178dce67fe898...
they are more than 100 per second and speed is the most important thing(network is always busy).
what should i use to transfer my data(tcp/ip, pipes, via, etc)?
how should i serialize it(BinaryFormatter,Xml,User defined or any better ...
When a Control is shown in a TabControl, it can set the UseVisualStyleBackColor property of the TabPage to true in order to show properly in the tab control rather than just a solid colour fill. However, when a Control is shown in the management console as part of a PropertyPage, its parent is a PropertyPageContainerControl rather than ...
Here's a thinned out version of the classes I have.
public abstract class BaseParent { }
public abstract class ChildCollectionItem<T>
where T : BaseParent
{
// References a third-party object that acts as the parent to both the collection
// items and the collection itself.
public T parent;
// References the collection to w...
I continuously find myself having to write timed windows services that poll outside queues or run timed processes. I consequently have a fairly robust template by which to do this, but I find that every time I write a service to do this, I start with the same template and then write the process inside it.
This morning I find myself won...
The following hunk of code (snipped for brevity) generates an xml doc, and spits it out to a file. If I open the file in Visual Studio it appears to be in chinese characters. If I open it in Notepad it looks as expected. If I Console.WriteLine it look correct.
I know it's related to encoding, but I though I had all the encoding ducks ...
Hello,
I'm signing some data on a .net-based smartcard and trying to verify that signature in a java environment - but without success.
Smartcard (c#):
RSACryptoServiceProvider rsaProvider = new RSACryptoServiceProvider(1024);
// In a different method, rsaParams.Exponent and rsaParams.Modulus are set
rsaProvider.ImportParameters(rsaPa...
Hey,
In the main thread I need to do the following:
Create a second thread where I'll
show a modal form that will act as
an "activity indicator"
Start a task (this task MUST be executed from the main thread)
Close the modal form created in the second thread.
The question is that I don't know how to show a modal form and not stop the...
Is there a better .net way to check if a DateTime has occured 'today' then the code below?
if ( newsStory.WhenAdded.Day == DateTime.Now.Day && newsStory.WhenAdded.Month == DateTime.Now.Month && newsStory.WhenAdded.Year == DateTime.Now.Year )
{ // Story happened today
}
else
{ // Story didn't happen today
}
...