We are currently thinking of building a cache-system to hold data pulled out of an SQL database and make it available to a couple of other applications (website, webservice, etc). We imagine the cache to be running as a windows service and basically consist of a smart dictionary which holds the cache entries. My question is, is there a l...
Hi,
I want to set some attributes just before the object is serialized, but as it can be serialized from several locations, is there a way to do this using the OnSerializing method (or similar) for Xml serialization - my class is largely like this - but the On... methods are not being called...:
[Serializable]
[XmlRoot(ElementName = "R...
Are there any tools that can help find race conditions when testing multi-threaded .net code? I'm looking for something with similar capabilities to IBM's ConTest tool for Java.
...
I need to call a VBScript file (.vbs file extension) in my C# Windows application.
How can I do this?
There is an add-in to access a VBScript file
in Visual Studio.
But I need to access the script in code behind. How to do this?
...
I was looking into embedding custom version strings using in assemblies a while back, and one approach that the documentation suggested was to embed a windows resource.
The only way I can see to create a windows resource is to use the 'Native Resource Template', but the template is a binary file that isn't suitable for using with subwcr...
I need to extend MS Project's functionality for my company, so I would like to embed some .NET GUI controls into Project. The plan is that my controls save the user input into my custom DB tables, but I do have to bind them to tasks, current user, resources etc. Could you give me some advise how to start? I am interested in:
Sample app...
I have the following line of text
Reference=*\G{7B35DDAC-FFE2-4435-8A15-CF5C70F23459}#1.0#0#..\..\..\bin\App Components\AcmeFormEngine.dll#ACME Form Engine
and wish to grab the following as two separate capture groups:
AcmeFormEngine.dll
ACME Form Engine
Can anyone help?
...
I have a problem with a memory leak in a .NET CF application.
Using RPM I identified that dynamically creating controls are not garbage collected as expected. Running the same piece of code in .NET Window Forms behave differently and disposes the control as I expected.
See the output from RPM via PerfMon for the Process Heap counter...
My DataGridView needs to support a number of types and these types may have any number of public properties, not all of which I want to display.
Can anyone suggest a way to dynamically customise a DataGridView's columns when binding a class a datasource? Is there an attribute that will tell a control whether to use a property as a colum...
When using resources such as brushes, templates and styles in WPF, they can be specified either as StaticResources
<Rectangle Fill="{StaticResource MyBrush}" />
or as a DynamicResource
<ItemsControl ItemTemplate="{DynamicResource MyItemTemplate}" />
Most of the times (always?), only one works and the other will throw exception du...
I've been tryin' to use call Page Methods from my own javascript code but it doesn't work. If I use JQuery AJAX Method I can sucessfully call the Page Methods, but the problem is that I need to do this from my own Javascript code because in the place where I work we can't use Third Party Javascript Lybraries and we are building our own l...
I need to access some members marked internal that are declared in a third party assembly.
I would like to return a value from a particular internal property in a class. Then I'd like to retrieve a value from a property on that returned value. However, these properties return types that are also internal and declared in this third party...
I'm subclassing a native window (the edit control of a combobox...)
oldWndProc = SetWindowLong(HandleOfCbEditControl, GWL_WNDPROC, newWndProc);
In my subclassing wndproc, I'll have code like this, right, but I can't figure out the syntax for calling the oldWndProc.
int MyWndProc(int Msg, int wParam, int lParam)
{
if (...
I have an application which uses a UDL file where the connection string specifies "Provider=SQLNCLI.1" which doesn't work on a specific machine because sqlncli.dll is not installed.
Another .Net app however, where the connection string is in app.config and does not specifically show the provider does worrk. The "Change Data Source" dial...
I ran accross a CSR file (Certificate Signing Request) and I need to extract some information from it.
There's a way to decode it using .NET Framework?
...
I will be teaching a class sson, and I need to explain what factors should affect your decision of data access technology.
I am familiar with many data access methods like Typed Data Sets, Linq to SQL, Linq to Entities, .netTiers, LLBLGen, and custom calls with SQL connection objects and command objects.
Some of my clients will only all...
I am currently looking for a way to be notified when a child is added to the visual or logical children.
I am aware of the Visual::OnVisualChildrenChanged method, but it does not apply to me since I can't always inherit and override this function. I am looking for an event.
So, is there a way for the owner of a FrameworkElement/Visual...
Hi
Using C#, does anyone know how to get the MarshalAsAttribute's Sizeconst value in runtime ?
Eg. I would like to retrieve the value of 10.
[StructLayout[LayoutKind.Sequential, Pack=1]
Class StructureToMarshalFrom
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
public byte[] _value1;
}
Thanks in advance
...
Imagine a WinForms client app that displays fairly complex calculated data fetched from a server app with .Net Remoting over a HTTPChannel.
Since the client app might be running for a whole workday, I need a method to notify the client that new data is available so the user is able to start a reload of the data when he needs to.
Currentl...
I am working on a .NET application that displays multiple charts. My users would like an easy way to say "take chart #3 and maximize it on my fourth monitor".
How can I determine the number of monitors so I can give them a selection of "monitor #1, monitor #2, etc"? (Not every user has the same number of monitors.)
And once the user ...