|
Elements and attributes are all XML nodes. A XML node is the basic building block of a XML document and besides the both named at the beginning there are some other types of XML nodes e.g. the XML declaration. To see what types are distinguished by the .NET Framework take a look at the XmlNodeType enumeration.
"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
|
|
|
|
|
Thanks, the whole thing is kinda confusing and without knowing where to look for...
|
|
|
|
|
in the name of god
hi.
how can i take handle of a object in other softwar(for example commbox in maya)?
tank you.
|
|
|
|
|
One thing that may start you in the right direction is the FindWindow[^] Win32 call.
|
|
|
|
|
i am deleting a record from the database and i get an exception message : datatype mismatch, i have the following query for deleting a reocrd from the database:
string query = "delete from registration where id = '"+
Convert.ToInt16(this.id.Text)+"'";
its point to the line 568
which contains:
com.ExcecuteNonQuery();
|
|
|
|
|
What is the type of your id column.
According to your query it must be tinyint .
do Convert.ToInt32 , if it is of type int
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
if it's an int type you shouldn't use the single quote characters
what db are you using
sql server normally likes
delete <tablename> where id = 7
access tends to like
Delete * from <tablename> where id = 7
i would guess it's a type conversion thing though, by putting the ' char in you make the data provider pass it as a string type
HTH
Russ
|
|
|
|
|
remove the single quotes and it will work.
|
|
|
|
|
G'day folks,
At the moment I am writing a little application which utilities multi threading to do some processing. Essentially, my application creates a fixed number of threads,i.e. 5. Each thread when started performs three main tasks which represents the operational states the thread is in. The operational state is essentially a particular method that is executed to perform the specific task.
In my current design I have created a global array which contains five elements to hold each thread's operational state. Each time the thread moves to a new operational state, the thread's operation state value is changed in the array. I have used the correct locking processes on the array when a thread has to update it. Here is some code which shows I how the thread is started:
int []operationalStateArray = new int[5];
void Main(string[] args)
{
Thread[] ThreadArray = new Thread[5];
MyClass myclass = new MyClass();
myclass.FetchStatusArray(ref operationalStateArray);
operationalStateArray [0] = 1; //1 implies encoding task
ThreadArray[0] = new Thread(new ThreadStart(myclass.ProcessData));
ThreadArray[0].Start();
ThreadArray[0].Join();
}
Having explained my application, my question is that: Is the approach I have taken in accessing the global array using threads is okay or are there better solutions? Is it okay to pass operationalStateArray as a reference to be manipulated by the ProcessData method in MyClass?
If anyone can give me their feedback on this I would most appreciate it.
cheers
Vee
|
|
|
|
|
Hi
I think that you can have a class (for example Operation) that has a state property ( a readonly property) that gets the state of the operation.
Operation class has a ProcessData method that will be used in ThreadStart to start a thread and within this method the operation can change its state.
Using this approach , you can have unlimited operations (not only 5 or a known number of operations) and no one can change the state of a opration except an operation itself that means you don't have to be worry about locking you objects and finally there's no need to remember the index of an external array(when an operation wants to change its state)
Good Luck
|
|
|
|
|
thanks for your feedback. I took your solution on board and managed to derive a solution based on event based asynchronous design pattern. I just had to look a bit harder in the local help of VS2005.
|
|
|
|
|
Hi,
I was wondering how i could print the content of an array string into a messagebox without using a for statement.
Thanks in advance!
|
|
|
|
|
Use the string.Join method to concatenate the items in the array into a single string.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I am creating a designer for a control and would really like to access the Select Resource Dialog to choose an image, however I can not seem to find it anywhere.
The select resource dialog is the one which is shown after clicking the ellipses on the property grid for the Image property for a Button.
Anyone know what this dialog is called?
Thankyou
|
|
|
|
|
Many of the editors are implemented based on the type of the property.
Have you tried just implementing a property as such:
...
private Image myControlImage;
[Browsable(true), Category("Design"), Description("Sets an image to display in the Bubbah Control")]
public Image Image
{
get{return myControlImage;}
set{myControlImage=value;}
}
|
|
|
|
|
Can anyone advise on some design guidelines or known patterns to implement a custom paging on business objects to use with an ObjectDataSource?
|
|
|
|
|
Hello friends,
I want to create a installer like we are adding deployment project in our application.
but i want it to be done at runtime from an application.
for example,i have one desktop application.
in that if i will click make installer than it should make an installer
which includes more than one files.
And furher when user runs that installer it will call installer class which makes registry entries for further use.
any kind of help is appreciable
thanks in advance.
Irfan Kothari.
|
|
|
|
|
lets say i have the folowing connection string:
"Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Project Data\PTMA_database_Data.MDF";Integrated Security=True;Connect Timeout=30;User Instance=True"
the thing is...i have multiple databases, all located in different folders, all folders in c:\Project Data\. the user is supposed to chose the folder from wich the database is suppused to load. But how do i do that...How can i make the connection string look like this:
Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Project Data\"+path+"PTMA_database_Data.MDF";Integrated Security=True;Connect Timeout=30;User Instance=True??
rzvme
|
|
|
|
|
First you use a FolderBrowserDialog to have the user point to the appropriate folder. Make sure you set the default directory to start at the C:\Project Data location.
Then after it comes back you use the property within it to find out which folder they chose. Use debugger mode to confirm what you get back, it may provide your entire path name to the folder. In that case you would have:
AttachDbFilename= Path.Combine( browser.FolderName, "PTMA_database");
|
|
|
|
|
When we use the operator "+=" with delegate, does it denote multicast.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
i think we use "+=" with delegate when we add event handler to any
event and call specific method to handel that event through deligate.
rahul
|
|
|
|
|
rah_sin wrote: i think we use "+=" with delegate when we add event handler to any
event and call specific method to handel that event through deligate.
correct. And here is my question, does it denote multicast.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
no i don't thionk so
becouse multicast deligate is link list of deligates.
rahul
|
|
|
|
|
rah_sin wrote: no i don't thionk so
becouse multicast deligate is link list of deligates.
Events are special kind of delegates, and += are used with events, which means an event may have more than one event handlers. So what i concluded is that += (with events) denotes multicast.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
+= is applied on events right? and event delegates are multicast delegates.
--------------------------------------------------
|
|
|
|