|
I guess I am mostly alone on this. Does anyone have any advice for what requests I should be making so I can stop wasting my time ctrl-alt-deleting and rebooting?
|
|
|
|
|
format c:\
Seriously, it will solve all your problems.
rotter
|
|
|
|
|
This is my string below:
<ProcessData Process="GetAllData" Result="Success" OutputId="Success" Records="1" User="myUserName" Name="GetAll" ProcessItemId="b2494f34-2ed8-41f5-b889-dbaa4aedb1c9" />
Notice that there is Result="Success".
It could be failure or something else too.
I would like to get the value of Result from this string above.
I am trying with indexof but can not get the value of success.
How is this done please?
Thanks
|
|
|
|
|
Use Regular Expressions
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
Isn't this the same question as you asked under the title "Web service"?
Anyway, to take pity on you, here is one way:
assuming your string is called input
int pos = input.IndexOf("Result=")+8;
int pos2 = input.IndexOf("'",pos);
string output = input.Substring(pos , pos2 - pos);
All it takes is a few minutes in debug mode.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi,
The other question was to do with calling the web service which is now solved.
This is to do with pulling the data out of the xml string. Which is now solved too.
Thank you
|
|
|
|
|
This is not a string, this is an XmlNode. You read Xml by using the classes in the System.Xml namespace
When will people stop treating Xml data as strings instead of the Xml data that it is!
|
|
|
|
|
The string you are uses does look a lot like XML. You could try using Linq to XML (http://msdn.microsoft.com/en-us/library/bb308960.aspx[^]).
XElement element = XElement.Parse(YourString);
string Result = element.Attribute("Result").Value
Dawn is nature's way of telling you to go to bed.
|
|
|
|
|
As this is part of the thread below, you should have continued with that one rather than started off a new one.
arkiboys wrote: I would like to get the value of Result from this string above.
You have already been told to SelectSingleNode to get this. Well, you can use this to return the OutputId value.
|
|
|
|
|
Please help me
regards,
Sri
|
|
|
|
|
srinivas0099 wrote: Please help me
Why? You cannot even write a proper question. Write some code, then when it doesn't work post a specific question.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
srinivas0099 wrote: Please help me
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
WTF !
use Dictionnary class
|
|
|
|
|
System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Well, that's just obviously wrong. He said Hashtable-like functionality, not Hashtable functionality. The way I see it, he has 4 options:
1. public class MyHashtable : Hashtable {}
2. public class MyHashtable { /* Implement the hash table in here as a member variable that links to a standard Hashtable */ }
3. public class MyHashtable { /* Implement the hash table here from scratch */ }
or my favourite:
4. Go to job centre and apply for position with Pizza Hut as table wiper.
|
|
|
|
|
Pete O'Hanlon wrote: Pizza Hut
Hashtable - maybe the Amsterdam branch[^]?
Pete O'Hanlon wrote: table wiper
... as easy as pizzatable.Clear();
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hi All,
I need a combobox which autocompletes from the Items list, but if the user is typing I need it to suppress keystrokes corresponding to characters that dont match items in the list, if that makes sense.
So, you can type the name of a list item, but you cannot type a string that is not already in the list.
Anyone know how to do this?
Thanks
Jon
|
|
|
|
|
This article[^] has a LimitToList property that when true will fire a NotInList event.
I'm sure it could be adapted to your needs.
Another one here[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hello
Am writing a application using C# (studio 2008) which is retreiving the logs from a Smartcard Terminal. As I wanted to create a empty mdb file at run time if it does not exist at a specific location.
I kindly expect some stuff to solve this query.
regards
Sayed Sajid
|
|
|
|
|
Use Office Interops
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hi
add a reference to DAO activeX lib
regards
|
|
|
|
|
Hey there Sayed,
Easiest way I can think of would be to keep a master copy of an empty .MDB file and then just copy it to the specified location using the File class when you want to...
// example
File.Copy(path, path2, true);
|
|
|
|
|
Good day all!
I believe I have a rather simple question but I can not seem to work it out using a Switch statement.
I have a small function that checks the time and if the time is one of the parameters set (a total of 6 time points), then I wish to peform a duty. Instead of using an if statement for all of the time points I wanted to add 3 time points to one case and 3 to another and do nothing in the default.
I cannot compile my function while I have the case statements setup in this manner:
case "10:00", "11:20", "13:30":
Do something
break;
case "17:00", "19:20", "23:30":
Do something else
break;
default
break;
Can anyone pinpoint my syntax error with the cases I have defined above. When I used VB, this syntax worked fine with the multiple points but it doesn't now.
Any pointers would be greatly appreciated.
|
|
|
|
|
switch(time)
{
case "10:00":
case "11:20":
case "13:30":
break;
}
No multiple params in a switch case, fallthrough only allowed when no code is defined in that particular case.
|
|
|
|