|
//Create a object
System.Collections.ArrayList oArrayList = new System.Collections.ArrayList();
// Add all your entries in ArrayList Object in form load event or the event which suited your problem
oArrayList.add(/* Your entry*/);
//then search for a value whether it exists or not
bool isexist=oArrayList.contains("Your search value");//method returns true if your search value exist.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: System.Collections.ArrayList
Use a strongly typed generic List<T> instead of arraylist.
|
|
|
|
|
Have got the linkedlist running with data stored in a queue already but not sure of how to search through the queue whether the textbox entry exists in the queue or not.
|
|
|
|
|
Angelinna wrote: data stored in a queue
Your question is not clear. Are you using a generic Queue<T> ? if yes, it has a Contains()[^] method which can be used.
|
|
|
|
|
How do I use the contains()
|
|
|
|
|
Mogaambo wrote: Binary search
On a linked list?
|
|
|
|
|
Hi..
I need to check the serial port has connected to any device, how to do it and can i able to find which device is connected..?
regards
skvs
|
|
|
|
|
skvs wrote: I need to check the serial port has connected to any device, how to do it
Open a serial port and see if the device responds. I told you that yesterday. Did you even try?
skvs wrote: can i able to find which device is connected..?
That will be different for every device, there is no standard identifying technique for serial ports.
|
|
|
|
|
I tried, I can able to open the serial port but im not able to find which device is connected..
im sorry i couldn't get much details regarding this, please help me to find whether the device is connected or not.
without connecting any device, i can able to open the port.
|
|
|
|
|
what is the difference between WinIdeaAuto.dll and Interop.WINIDEAAUTOLib.dll of winIDEA 2009?
how to use the following functions in c#.net 2005
1.DebugReadVlaue()
2.DebugWriteVlaue()
3.Download()
4.Disconnect()
5.Connect()
i got the above functions by adding the Interop.WINIDEAAUTOLib.dll into the C#.net application
could any one provide some sample codes for using the above functions?
.... tony
|
|
|
|
|
I have attempted to get CPU and RAM usage with a System.Diagnostics.PerformanceCounter, but not only are they a pain in the ass to work with, they don't work the same on different systems. Is there another way to get this information without using a performance counter?
|
|
|
|
|
I use the Process class rather. Use Process.GetCurrentProcess() to get the current process.
|
|
|
|
|
Um, not what i want. I don't want to get the current process, i want to get the CPU and memory usage. I have no interest in the current process.
|
|
|
|
|
This is a chinese graph software to monitor ,application in industry and electric power.Its site is "http://www.visual-graph.com"
welcome to visit.
|
|
|
|
|
Hi,
my question is simply. can i create a gps software (c#) for this phone?
i think i can because there is a N70 version that cames with a gps software, my didn´t came with that (less expensive) but i think that it maybe has some hardware prepared for that.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Is it a Microsoft platform phone ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
OS windows platform? no no no
has nokia OS.
other version (of same phone) has gps software.
i think (not sure) that i can install it.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
nelsonpaixao wrote: has nokia OS
It uses Symbian OS. You can't run C# programs in that. Use Symbian C++ for development.
|
|
|
|
|
The code you write in C# gets compiled into CIL[^] (formerly known as MSIL). The CIL code needs the .Net Framework (the .Net Compact Framework in this case) to run. The .Net Compact Framework requires Windows Mobile. And as far as I know, Nokia phones don't support Windows Mobile.
However, you can write C++ to target Symbian OS Symbian Developer Network[^]. You can also write Java as Symbian OS supports it.
Eslam Afifi
|
|
|
|
|
thanks for the posts
better give up on that for now
i ll start training on something else
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hello All,
I am having some trouble taking data from my Dataset and transforming into an XML document that has the proper formatting. I'm hoping someone here may have had similar trouble in the past.
(All names have been changed to protect the innocent )
What I want get when everything is said and done is the following:
<ResidentTransactions>
<Account>
<Customer>
<ServiceTransactions>
<Transactions>
<Charge>
<Detail>
<Description>Trash pick-up</Description>
<TransactionDate>2008-08-01</TransactionDate>
<ChargeCode>trash</ChargeCode>
<CustomerID>#########</CustomerID>
<Amount>12.00</Amount>
<Comment>Trash (08/2008)</Comment>
<PropertyPrimaryID>TestProp1</PropertyPrimaryID>
</Detail>
</Charge>
</Transactions>
<Transactions>
.
.
.
</Transactions>
</ServiceTransactions>
</Customer>
</Account>
</ResidentTransactions>
What I am getting is basically ignoring all the nesting, and just grabbing the innermost table with the actual data:
<ResidentTransactions>
<Detail>
<Description>Trash pick-up</Description>
<TransactionDate>2008-08-01</TransactionDate>
<ChargeCode>trash</ChargeCode>
<CustomerID>########</CustomerID>
<Amount>12.00</Amount>
<Comment>Trash (08/2008)</Comment>
<PropertyPrimaryID>TestProp1</PropertyPrimaryID>
</Detail>
<ResidentTransactions>
The code below is what is loading the data into the dataset:
SqlDataAdapter Da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
ds.ReadXmlSchema(@"C:\DEV\Schemas\BillingData.xsd");
Da.Fill(ds, "Detail");
When writing the XML I do the following:
StringWriter source = new StringWriter();
XmlDocument SourceXml = new XmlDocument();
XmlDocument RetXml = new XmlDocument();
ds.WriteXml(source,XmlWriteMode.IgnoreSchema);
SourceXml.LoadXml(source.ToString());
I believe it may have something to do with the fact that the outermost elements don't contain any data, they just contain the sub elements. When I render the XML, those "tables" in the dataset don't actually have any data to grab. In the last few days I haven't been able to come up with a solution though, and I really don't want to piece together a big string unless I have to.
Anything that may point me in the right direction would be greatly appreciated.
Thank you,
-Ian Jacobs
[EDIT] Removed an ID code I missed on the 1st pass
|
|
|
|
|
XML is not suppose to be pretty, just correct and readable. If you want to pretty-format the XML, you have to do it yourself.
|
|
|
|
|
|
I don't understand why the CASE statements like this don't work. Why can't I check for greater than?
private int iGrade = 85;
private char cLetter = ' ';
switch (iGrade)
{
case > 90:
cLetter = 'A';
break;
case >; 80:
cLetter = 'B';
break;
case > 70:
cLetter = 'C';
break;
default:
cLetter = 'F';
break;
}
Everything makes sense in someone's mind
|
|
|
|
|
KMAROIS wrote: Why can't I check for greater than?
Because Switch Case[^] doesn't work like that.
You can use if else [^]instead.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|