|
Are you using a Beta or RC of (VS).NET?
There was a known bug in the Betas/RC where the Socket.Close function didn't close the socket. If you want the full details search the DOTNET archives.
With it being such a large bug I would assume that it has been fixed in the final versions.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
Hello James
Thanks for the answer
I get this both on Studio B2 and Studio Final SP1
|
|
|
|
|
I have framed Web form, I want to pass parameter (query string) from left frame to right, so in the right frame it will show the records according to whatever user selected from left frame. How can I accomplish this?
Beginner
|
|
|
|
|
do it in your link.
<a href="RightFrame.aspx?varA=1&varB=foo+that+hurts" target="rightframe">
I suggest at least skimming the HTML 4.1 Specification for a better understanding.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
I wanna declare class with multiple inheritance .
public class myclass: System.class1 and System.Class2
How should I write the code that compiler accept it?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
You can't, not directly anyway.
You are limited to one base class, but you can implement as many interfaces as you desire.
The recommended way is to have class1 and class2 be interfaces (or just one of them be an interface). The downside is that it makes it more difficult to extend existing functionality because you have to reimplement everything.
I suppose one solution would be to have interfaces IClass1 and IClass2 then create your classes Class1 which implements IClass1 and Class2 which implements IClass2 .
Then your class that "inherits" from Class1 and Class2 implements both interfaces, relegating the method calls back to Class1 and Class2 objects if the base functionality is desired. And since you implement both interfaces you can cast the object to both interfaces as well.
Its not pretty but it should work for the most part.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
So you can not do something like this?
<br />
class myClass:Class1<br />
{<br />
<br />
}<br />
<br />
class Class1:Class2<br />
{<br />
<br />
}<br />
Nick Parker
|
|
|
|
|
Nick Parker wrote:
So you can not do something like this?
class myClass:Class1
{
}
class Class1:Class2
{
}
Of sourse you can - that's single inheritance.
But you can't do:
<br />
class myClass: Class1, Class2<br />
{<br />
}<br />
The "solution" is to do the following:
<br />
class Class1<br />
{<br />
void foo(){};<br />
}<br />
<br />
interface IClass2<br />
{<br />
void bar();<br />
}<br />
<br />
class Class2: IClass2<br />
{<br />
void bar(){};<br />
}<br />
<br />
class MyClass: Class1, IClass2<br />
{<br />
Class2 m_implClass2 = new Class2;<br />
<br />
void bar()<br />
{<br />
m_implClass2.bar();<br />
}<br />
}<br />
<br />
Hope this helps!
Dale Thompson
|
|
|
|
|
Thanks for clearing me up on this one Dale.
Nick Parker
|
|
|
|
|
Sure thing.
Dale Thompson
|
|
|
|
|
This you can do.
I'm not really sure what this is called (baring a mini-object model).
I understand multiple inheritance as:
<br />
class mybase1<br />
{<br />
}<br />
class mybase2<br />
{<br />
}<br />
class mysuper:mybase1,mybase2<br />
{<br />
}<br />
<br />
Which you can't do in C#.
Cheers,
Simon
X-5 452 rules.
|
|
|
|
|
I want to make a program that recognize my voice and when I will speak, i will order the program to run something, like say"open + filetoopen" will open the program I want to start
I want to write something to a document, I can tell each word to my program and he can write it to the document.
Things like that. Anybody know how can I do this.I want something that recognize my voice and answer to her.
Thanks
|
|
|
|
|
Microsoft agent has some decent speech input, and I think a sample comes with the .NET framework. If not try www.microsoft.com/msagent
|
|
|
|
|
Can someone give me the basic steps to getting this going? I have a lump of code which takes a while to execute so I want to temporarily put a progress bar into the status bar while this is happening then remove it when the code has finished.
The docs mention using ownerdraw status bar panels, but I need a bit more detail on exactly how.
|
|
|
|
|
|
At last I found the way to compile manifest into C# exe file. Download program called PE Explorer (http://www.heaventools.com). This program can insert manifest resource into the final exe file. It's a little odd, but it works very well
|
|
|
|
|
I want to use this property for Button.Is that possible?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Not with the current set of .NET controls. Its easy after you figure out how to get the parent to draw itself on a Graphics object you give it, but so far I've hit a dead end there.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
James T. Johnson wrote:
Its easy after you figure out how to get the parent to draw itself on a Graphics object you give it, but so far I've hit a dead end there.
What does this means James?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
|
Thanks you,I'll do that.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
In my aged c code, there is tons of "%.1f" in source.
How can i transfer it to c#?
i read the document of Console.Write.
the format is describe by {a,b:s}.
How can i get the same result as c format string like "%.1f"?
|
|
|
|
|
Are you asking how you can use "%.1f" in C# or for the format string that produces an equivilant to "%.1f"?
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
You can use the Math.Round static function or the String.Format method (called implicitly below).
double d = 136.7835;
Console.WriteLine(Math.Round(d, 1));
Console.WriteLine("{0:.#}", d);
Both of these result in 136.8 which is what the C/C++ format specifier %.1f would provide.
Cheers,
Tom Archer
Author, Inside C#
|
|
|
|
|
Console.WriteLine("Test: {0:f1}", 765.7689);
The result will be 765.8 instead of 765.7, but usually that is the preferred output...
/moliate (just started learning C#)
|
|
|
|