I am trying to optimize a piece of .NET 2.0 C# code that looks like this:
Dictionary<myType, string> myDictionary = new Dictionary<myType, string>();
// some other stuff
// inside a loop check if key is there and if not add element
if(!myDictionary.ContainsKey(currentKey))
{
myDictionary.Add(currentKey, "");
}
Looks like the Dictio...
I want my dataset to generate xml that looks like this
<Bugs>
<Bug>
<Name></Name>
<Desc></Desc>
<Comments>
<Comment></Comment>
<Comment></Comment>
</Comments>
</Bug>
</Bugs>
I am returning 2 sets of data from a stored proc, one returns the "bug" data and the other "comments".
I then load them i...
i want to consume a .NET web service which returns an object of some class in labview. How do i convert the returning object into a labview object. Currently it just returns a srting.
Thanks
...
Hi
I wonder if there is any .net library to create "dummy" instances of an object. In my particular scenario im dealing with classes with lots of fields, so manual creation is not practical.
It would not be that hard to code this. But maybe there is something out there.
Thanks
...
I may be doing something dumb, in which case I apologize. I'm working with the System.Threading.Timer class, and am setting on-off timers, using a state object to pass control information. Everything is work as I expected, except that the state object doesn't get finalized until the program exits. This example shows what I mean.
class S...
I basically created 2 child controls and I want to set their width to be equal to the width of the parent composite control. The problem is when I do this using the parent.Size property, it doesn't work. It only works once when you add the control.
Am I supposed to override an event not a property? I thought the property change would be...
There are a few ways to start creating a new custom control in VS? Which one should I use? As in:
Right click project -> Add ->
1. User Control, or
2. Component, or
3. Custom Control, or?
I use #1 and get a partial class similar to:
namespace MyControls
{
partial class NewControl
{
/// <summary>
/// Required designe...
I'm about to start working on a new .NET project where I'm going to need to put real-time data from a hardware device on a chart and I was surprised to find out that ZedGraph development seems to have died out (last activity on the wiki is noted in late 2007). Is that true?
If so, are there any good open-source replacements for ZedGraph...
I'm in need of a way of controlling Apache and reading configuration files etc for automating some tasks, does anyone know of any automation APIs or frameworks much like what Microsoft offers for IIS?
The application is a C# WinForms app that has a Apache + PHP (WAMP stack essentially). We can't use XAMMP, I need to create virtual hosts...
quandry is - which of the following two method performs best
Goal - get an object of type Wrapper ( defined below )
criteria - speed over storage
no. of records - about 1000- about 2000, max about 6K
Choices - Create Object on the fly or do a lookup from a dictionary
Execution speed - called x times per second
NB - i need to deliver t...
In XNA, is it acceptable to create a GameService for an object that isn't a GameComponent? I know that a GameService is intended to be a way to access a GameComponent, but what if the object that you're trying to provide access to doesn't need to update on every update cycle? For example, I have a Camera2D object that can calculate a Mat...
Hey guys,
I'm getting a very weird issue with standard ASP.NET backend code, and the latest version of the Safari browser.
Basically, in the backend ASP.NET code we're using normal response.redirect() calls, and sometimes, in Safari, we'll just get a "server is down" kind of error, as if Safari can't connect to the server.
Unfortunate...
I require a free .net XSL-FO processor and have initially tested nfop's functionality. I have found some shortcomings which are significant in allowing me to meet the requirements for my project.
The issues I have encountered are:
SVG do not render
watermark functionality is basically impossible to render - body renders before all ot...
Can you tell me what is the exact usage of properties in C# i mean practical explanation
in our project we are using properties like
/// <summary>
/// column order
/// </summary>
protected int m_order;
/// <summary>
/// Get/Set column order
/// </summary>
public int Order
{
get { return m_order; }
set { m_order = value; }
}
///...
Hi
I have a .NET web app built using VS 2008. I included a strongly typed dataset that uses custom types in the table columns. I did this by manually editing the XSD file behind the dataset. This was all working fine until I did a big search and replace to change the name of the project. Now I can't get it working again no matter what I...
I have one xsd file having definition of two tables suppose A and B, and i want to create two files as A.xml and B.xml.
When i enter the data in these xml files data should validate with xsd
My question is
how can i validate the data while entering data in xml file?
...
Problem:It will asks there is no assembly reference/namespace for Database
Database db = DatabaseFactory.CreateDatabase();
DBCommandWrapper selectCommandWrapper =
db.GetStoredProcCommandWrapper("sp_GetLatestArticles");
DataSet ds = db.ExecuteDataSet(selectCommandWrapper);
StringBuilder str = new StringBuilder();
for(int i=0;i<=ds...
I have an ASP.NET 3.5 web application. I added the a class library project, that have class as clsOperation, this class have 3 methods. I build this class. Add .dll to my web application as reference.Biult my website. but while I am trying to add a header in the code behind (using my namespace) the class's namespace is not appearing in i...
Im making a asp.net(2.0) website.
I have defined two resource files in the App_GlobalResources folder
1) Website.ar.resx
2) Website.en.resx
Im trying to obtain the ResourceManager programatically.
Now, if I would have only defined Website.resx, VisualStudio automatically starts showing me a 'Resouces' namespace with the Class 'Websi...
On a treeview after the select event, I populate a listview with images.
I want to custom format these images and place a black color border around each image.
private void TreeView1_Select(object sender, EventArgs e) {
if (folder != null && System.IO.Directory.Exists(folder)) {
DirectoryInfo dir = new DirectoryI...