|
I wouldn't use a multidimensional string array. There are many other better options.
If you stay with the current array, you can store your answers in another array. Then check each answer against that array.
|
|
|
|
|
Hi edboe,
I ran out of options how to do it and the multidimensional seems to work.
Do you have a sample for me about that "check each answer against that array"?
Thanks in advance!
|
|
|
|
|
Hi...
How i can check Serailport status...? Means whether another application is using that serialport or not...?
In my application, if i dont check this & if some other application or hyprterminal is using same comport then my application is crashing...
Thanks in advance,
Vinay
|
|
|
|
|
<br />
SerialPort port = new SerialPort("COM1");<br />
<br />
try<br />
{<br />
port.Open();<br />
}<br />
catch(Exception ex)<br />
{<br />
MessageBox.Show("Port " + port.PortName + " is already in use")<br />
}<br />
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
There is a requirement that, my application should sence that a pen drive is attached then it should read the files and copy to the machine.
What Should I do
My application is in C#
Please help
Rabindra
Rabindra
|
|
|
|
|
Can you be a bit more specific?
|
|
|
|
|
How to read an exact character from text file.
Example:line 2 char 15. Or just 15-th char.
I have Visual Studio 2003.
Vasildb
|
|
|
|
|
1 read the whole text in that file and put in a string.
2 split the string by "\n" and you will get array of strings
use it to get the line number.
3 when you extract the line go the your char
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
you can read in the textfile into a string and then select the character you want.
You could also read in the textfile line per line, put it in a string and select the character.
Look into StreamReader class and string class on MSDN.
hope this helps.
V.
Stop smoking so you can: enjoy longer the money you save.
|
|
|
|
|
There are some set of server controls its property enabled= may be true or false,now in code behind how to find its current state and i am getting the controls id during runtime like this
foreach(Control c in form1.Controls)
{
............
}
Thanks In Advance
Thanks In Advance
|
|
|
|
|
foreach(Control c in form1.Controls)
{
if(c.Enabled)
MessageBox.Show("this control is enabled");
else
MessageBox.Show("this control is not enabled");
}
|
|
|
|
|
but there is no property enabled availble there....
Thanks In Advance
|
|
|
|
|
What stancrm has written is correct.
You can use the 'Enabled' property of System.Windows.Forms.Control
There are two types of fools in this world: One who give advice and the others who do not take it...
|
|
|
|
|
Hi, Dear Respected Programmers
Kindly convert the mentioned VB6 method into C# language.
strActual = "BAT BALL GOALKEEPER"
intPosition = INSTR(strActual,"BALL"
Thank you in Advance
|
|
|
|
|
string strActual = "BAT BALL GOALKEEPER";<br />
int intPosition = strActual.IndexOf("BALL");
|
|
|
|
|
Thank you very much... now it is working
|
|
|
|
|
Let's first convert it to VB.NET:
strActual = "BAT BALL GOALKEEPER"<br />
intPosition = strActual.IndexOf("BALL")
Now it's very simple to convert it to C#:
strActual = "BAT BALL GOALKEEPER";<br />
intPosition = strActual.IndexOf("BALL");
Note: There is a difference how strings are handled in .NET compared to VB6. The index is zero based, not one based, and IndexOf it returns -1 if the string is not found, not 0.
---
b { font-weight: normal; }
|
|
|
|
|
|
Wrox is best
Syed Shahid Hussain
|
|
|
|
|
I found the ADO.NET Core Reference to be really easy to learn from despite being a reference after all. It doesn't target the 2.0 version of the Framework, but allot still applies. I supplemented it by Programming ADO.NET 2.0 Applications Advanced Topics which is also good.
I'd be willing to sell the ADO.NET Core Reference if you're interested.
|
|
|
|
|
Yes, I could be interested, but obviously it depends on price
What country are you from?
P.S. Feel free to email me: gingermigit@hotmail.com, if you would rather not give details in public.
Thanks tgrt.
|
|
|
|
|
Hi Guys,
Im creating my own personal app to store logon accounts and password. Could someone please give me any suggestions on where or how to store that information (and make it secure)?
The thing is I dont wish to use sql i would like it like visual basic 6 where a database is imbedded or something.
or maybe store it in a file but i dont want the data file to be seperate of the app for ppl to open or smth.
any suggestions would be greatly appreciated
Thanks
|
|
|
|
|
GermanDM wrote: dont wish to use sql
you mean the whole the database approach ??
try to use xml file and find away to encrypt the content
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
basically yeah like im using sql at work but i dont have sql at home.
mmm i was thinking xml as well thx
but why do you say if i get mad??
thanks
|
|
|
|
|
GermanDM wrote: but why do you say if i get mad??
That's his signature.
He just haven't figured out yet how to make it look like a signature.
---
b { font-weight: normal; }
|
|
|
|