|
Hi,
How can I use two different interfaces in a class?
something like this:
MyClass:Interface1 Interface2 ???
but that's wrong!!so...anybody can help?I'll be thankful.
|
|
|
|
|
pcsience wrote: anybody can help?
compiler messages?
documentation?
google?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Simple - just put a comma between them.
MyClass:Interface1, Interface2
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Have you considered the comma?
MyClass:Interface1, Interface2
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Dear All,
I have ListView full of things, but basically all the items have the same format :
TY223 [16]
TW121 [223]
...
...
If I want to substract the value 16 and TY223 from TY223 [16] , I go about it like this :
string[] a = itm.Value.ToString().Split('[');
string[] b = a[1].ToString().Split(']');
string first = a[1].ToString().Trim();
string second = b[0].ToString().Trim();
This works fine, however I'm only after the value 16. Is there a more elegant way of extracting this value from the item, instead of using
.Split()
Kind regards,
|
|
|
|
|
You might be able to do something like (I'd normally use something like this for reading from a file, but it seems to work here too):
string ReadWord(string buffer, char delimiter, int startPos)
{
StringBuilder sb = new StringBuilder();
for(int i=startPos; i<buffer.Length; i++)
{
if(buffer[i] == delimiter)
break;
sb.append(buffer[i]);
}
return sb.toString();
}
void main()
{
string firstPart = ReadWord(fullLine, ' ', 0);
int startPos = fullLine.IndexOf('[');
string secondPart = ReadWord(fullLine, ']', startPos);
}
Thats just from memory so it may not compile, but you get the idea.
My current favourite word is: Delicious!
-SK Genius
Game Programming articles start - here[ ^]-
modified on Monday, May 18, 2009 7:42 AM
|
|
|
|
|
Hi,
I like using regex:
System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex(@"[ [\]]");
label1.Text = "";
foreach (String s in r.Split(textBox2.Text))
{
label1.Text += s + "\n";
}
You might use index 0 and 2 and you don't need .Trim() again.
Have fun
|
|
|
|
|
how about, in one line...
string resultString = inputString.Substring(inputString.IndexOf('[') + 1, inputString.IndexOf(']') - inputString.IndexOf('[') - 1);
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I think you mean "extract" the value.
Regular Expression. I'd use something like:
"\[(?'Value'.*)\]"
|
|
|
|
|
Hi,
How can we create dynamic threads?
eg:- i want to create n number of threads in each event. When a incomming message come, it assign to a thread, like wise many number of messages will recive. Each time a new thread is created.
Is it possible to do so?
Thankyou
YPKI
|
|
|
|
|
|
Try looking for ThreadPool
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi All,
How to remove the form flickering in windows applications.
Regards,
Lalit Narayan
|
|
|
|
|
Results 1 - 10 of about 7,680 for c# remove form flickering with Safesearch on. (0.47 seconds)
Guess the web page!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
|
try this[^]
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
May I borrow your spoon I have someone in the VB forum that needs feeding!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I would recommend the 'Pointy Stick' [tm]
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
|
I have code coverage tool for NUnit i.e NCover. In my test solution I added my source code as .NET dll .When I run my test solution to using NCover it gives code coverage of test solution instead of my Sorcu Code dll. How NCover can give code coverage of dll? or it is mendatory to add source code as aproject in test solution??
Ethan Hunt 008
"Licensed to Code"
10th Cloud Corp
Banglaore
India
|
|
|
|
|
This is no NCover forum. You need to look for the documentation or go the NCover forum.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
please tell me how to shutdown system by C#
thanks.
shahin gholami
|
|
|
|
|
|
hi,
i would to guide the user trough an input routine.
it's like the setup routine of a program installation.
On the first Page the user has to agree the license.
On the next select components to install, then the install path and so one.
how can get something like this? i've to ideas..
1. create a single form for each step and switch between these.
2. create a lot of panels with the controls on it and make all accept of one invisible.
is there a better option?
maybe a controll like the tabcontrol without the tabs
or a multy layer panel ?
thank you!!..
|
|
|
|
|
What you need is to take the wizard approach. No, I'm not talking Harry Potter, but boring old code.
You will need:
0. Some panel controls. One panel for each step.
1. A back button
2. A forward button
3. A finish button
4. A cancel button.
Now - izzy wizzy let's get busy - write some code to show and hide the panels and Robert's your Mother's Brother.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|