|
Thanks for your replay. Actully i want to create the object of a from, whose name is stored as a string in the databse.It is unknown to me while writing the code. so i can't use 'myClass temp = new myClass;' as you mentioned. Let me have your idea regarding this
Regards
Hari
|
|
|
|
|
All forms inherit from System.Windows.Forms.Form. So just do this, assuming this is an MDI application (which is the only logical architecture to use this in).
...
System.Windows.Forms.Form newForm = Activator.CreateInstance(FormsCollection[requestedForm]);
newForm.MDIParent = this;
newForm.Show();
...
|
|
|
|
|
Look up Type.GetType and Activator.CreateInstance
|
|
|
|
|
hi everybody,
My question deals with xml and xpath use, i have an xml stream as it represented below:
<RESULTAT>
<node>
<DATE_ANNE>2000</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC120</NOM>
</node>
<node>
<DATE_ANNE>2000</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC121</NOM>
</node>
<node>
<DATE_ANNE>2000</MVT_DATE>
<TYPE>T</TYPE>
<NOM>EPAC122</NOM>
</node>
<node>
<DATE_ANNE>2001</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC123</NOM>
</node>
<node>
<DATE_ANNE>2001</MVT_DATE>
<TYPE>O</TYPE>
<NOM>EPAC124</NOM>
</node>
<node>
<DATE_ANNE>2002</MVT_DATE>
<TYPE>P</TYPE>
<NOM>EPAC125</NOM>
</node>
<node>
<DATE_ANNE>2002</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC126</NOM>
</node>
<node>
<DATE_ANNE>2002</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC127</NOM>
</node>
<RESULTAT>
i want to select all node wish have DATE_ANNE = 2000 and TYPE = I i've read in some articles that is possible using this code
string xPathquery="/RESULTAT/node/DATE_ANNE='2006' AND TYPE='I'";
XmlNodeList nodeList = doc.SelectNodes(xpathQuery);
i want to get a list like that
<RESULTAT>
<node>
<DATE_ANNE>2000</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC120</NOM>
</node>
<node>
<DATE_ANNE>2000</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC121</NOM>
</node>
<node>
<DATE_ANNE>2001</MVT_DATE>
<TYPE>I</TYPE>
<NOM>EPAC123</NOM>
</node>
..............
but it doesn't work can some one explain wether it's possible to obtein such result using Xpath in .NET.
best regards!!
|
|
|
|
|
Hi, try
/RESULTAT/node[DATE_ANNE='2000' and TYPE='I']
|
|
|
|
|
great thanks!! it works
|
|
|
|
|
Can I safely assume that if I write a small program in C# that uses SQL Express for its database, that it will run nicely on a pentium III 1.0 GHz with 128 - 256 MB of memory? Or is it wiser to use MS Access instead?
Because all programs I created up until today using C# or .NET in general run on at least a P4 machine with 256 MB memory, which is indeed considerably faster
WM.
What about weapons of mass-construction?
|
|
|
|
|
It's wiser to add a ton more memory.
|
|
|
|
|
That can be arranged, but the machine has to go for another year
WM.
What about weapons of mass-construction?
|
|
|
|
|
You just have to maintain awareness of what you're doing when you use SQL Express. Besides missing Enterprise Manager (but you can get freebies on the net that does most of it) it is basically a fully implemented engine with built-in size limitations on tables. And SQL Server 2005 will suck up every ounce of memory you provide it and then drool if you wave additional memory cards over your machine. So if you handle memory cards around your machine....were shark gloves if you want to keep your fingers.
|
|
|
|
|
Will keep that in mind
WM.
What about weapons of mass-construction?
|
|
|
|
|
I am trying to build a small application that collects data about several client applications; it also listens for triggered events and represents them graphically.
I have a basic version running ok. I am storing the client info directly into a listview. However I would now like to do other 'clever' things with the collected client info. I was planning to store the data in an array.
The problem I have run into is that I do not know the size the array will need to be until I have started to populate it with data. Is there a way to dynamically add data to an array? Or is there another way of storing the client info (so it can be processed and have things done to it)?
Thanks in advance...
Phil
"Rules are for the obedience of fools and the guidance of wise men"
|
|
|
|
|
Take a look at the System.Collections and System.Collections.Generic namespaces.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Will do...
Thanks
"Rules are for the obedience of fools and the guidance of wise men"
|
|
|
|
|
In .NET 1.1 try ArrayList. In .NET 2.0 try List<t>.
Kevin
|
|
|
|
|
Why don't you use a System.Collections.ArrayList or a System.Collections.Generic.List<t> ?
|
|
|
|
|
Ahh now this sound like my kind of tool. I planned on writing something similar once to graphically map transactions as they moved through BizTalk.
When you use an ArrayList or List<> the structure is such that an initial size is created and dynamically grows as you add additional items. It is better in the performance department if you generally know how many items will go into the array, but it is not a necessity.
You can also deploy custom dictionaries as well so you may want to do something like this:
Applications go into a List<icommunicators> (all the applications inherit the same interface making it easy to store different programs but treat them as the same type)
Application fires a trigger event
Listener (your code) plots that event but also adds to a Dictionary<string, eventlist="">
ReceivedEventEventHandler(object sender, ListenerEventArgs e)
{
ICommunicator details = (ICommunicator)sender;
PlotEvent(details.Name, e.EventObject);
dictionary[details.Name].Add(e);
}
Now you can expose a menu selection to show historical event data for any program in the list, trending across applications, frequency of events across time, and other fun statistical stuff.
|
|
|
|
|
hi,
i have to implement zip and unzip files in my application. The requirement is i have to take zippd file from mail attachment, unzip it to a particular location and use it. On the other hand i have to zip a files from a particular location and send it to someone as mail attachment.
Any help is appreciated. Thanx in advance
|
|
|
|
|
Explore the System.IO.Compression namespace.
This page[^] has an example for reading zip files.
ChrisB
|
|
|
|
|
I have write small programme that display the message "Hello World",i use notepad for that & save as .cs extention,then i compile it in .Net command prompt using csc myfilename.cs,but that display the error.Have i done any wrong thing here or is that way should i compile the C# file?
Pls Help Me
|
|
|
|
|
Standard question #1: what's the error?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Pls tel me is that way should i compile using .Net platform?,or different way?
|
|
|
|
|
Yes you have to compile it that way.
But you can use a IDE such as Visual C# Express which is free (search Microsoft's webpage). You only press F5 there and everything is done for you.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Thx,
If we thing i use to use VC#.net 2003 for diplay small message like "Hello World",hw can i do that,should i use windows application or just library file?
If i use windows application frm vc# there we dont have namespace and directive & all no then hw do we do that?
|
|
|
|
|
CWIZO wrote: Standard question #1: what's the error?
That is standard question #2:
Standard question #2:
What error message do you get?
---
b { font-weight: normal; }
|
|
|
|