|
I don't know... Stroustrup did it way back in the early 80s. Surely MS in the new millennium should have been able to do it? I think Chintan has the right answer below.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
let assume following class
class base1{}
class base2{}
class derive{} :base1,base2
Here if both base class has one common method say Method1().Now,during execution if derived class excess Method1(),then derived class will get confuse as from which base class i should get Method1(),therefore they were taken out from C# as well as from java.
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
There also the case where 2 base classes inherit from the same base, you then inherit from those 2 classes.
-----
If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
|
|
|
|
|
> Here if both base class has one common method say Method1().Now,during execution if derived class excess Method1(),then derived class will get confuse
Not really. This problem has already been solved at a same matter with multiple inheritance interfaces. It could be solved (IMHO with more willing).
For example:
class base1
{
void Method()
{
DoSomethingGood();
}
}
class base2
{
void Method()
{
DoSomethingVeryGood();
}
}
class derive : base1, base2
{
new void base1.Method()
{
DoSomethingBad();
}
new void base2.Method()
{
DoSomethingVeryBad();
}
}
|
|
|
|
|
It is VERY easy to abuse multiple inheritance and end up in "M.I. Hell" -- circular references, inheriting methods from each class that have the same name, destructors being called twice because two bases derive from the same base. All of this can be avoided with careful design, but I think it was a case of protecting the programmer from himself (herself).
-Phil
PS. I thought I'd save some time/code while programming a strategy/card game in C++ by having the card inherit from the actual unit so it could read it's stats and display it -- since the Card interface had the same accessor names for these stats I had to overload everything in the card in order to call the correct "versions" of these functions, and no time was saved.
|
|
|
|
|
|
Hi,
As a project for a friend I need to capture every album name from his website (long story).
Instead of going through page by page I thought it would be a good idea to scrape the html using regular expressions to extract the album names.
1) my first question is, is this the best way to go about it or can any body suggest a better method that I may not be aware of.
The reason I ask for a "better" method is because I've looked up regex for the first time and I'm pretty sure it will take me days to construct a useful expression (I find it hugely complex)
2) The layout of the html source is like this.
-------------------------------------------------------------------------------
<tr class="productListing-odd">
<td align="center" class="productListing-data"> <a href="http://eatmetalrecords.com/shop/product_info.php?cPath=41&products_id=2118"><img src="images/484_angra9.jpg" border="0" alt="ANGRA Angel's cry lp" title=" ANGRA Angel's cry lp " width="80" height="80"></a> </td>
<td class="productListing-data"> <a href="http://eatmetalrecords.com/shop/product_info.php?cPath=41&products_id=2118">ANGRA Angel's cry lp</a> </td>
<td align="right" class="productListing-data"> 33.00EUR </td>
<td align="center" class="productListing-data"><a href="http://eatmetalrecords.com/shop/index.php?cPath=41&sort=2a&action=buy_now&products_id=2118"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="60" height="16"></a> </td>
</tr>
-------------------------------------------------------------------------------
Based on this Should I first (and can I)
>Find all "image" tags
>Then find all "title" tags within the imgage tags
Any advice to get me up and going in some sort of direction is much appreciated
Thanks
DuB
|
|
|
|
|
Any help??
I had a look at the intro to regular expressions on this site. The examples are mainly on how to deal with bodies of text. there dosnt seem to be much on finding text within html tags?
Any known tutorials on this?
|
|
|
|
|
Take a look at the HTML Agility Pack[^]
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Scott's link looks like it might help you, but if you don't like that then Regex is probably the way to go. I'm not a Regex master so unfortunately I can't just spit out the pattern you need but something may already exist at the Regex Library[^]
|
|
|
|
|
I came across the agiltiy pack before but I couldnt figure out how to use it. theres not much documentation.
The regex library is great! found exactly what I was looking for.
Thanks for the replies
|
|
|
|
|
Hello...
Are there any easy ways to make label blinking ?
Instead of using Thread or Timer.
Thanks...
|
|
|
|
|
An animated gif file would be the easiest way probably.
|
|
|
|
|
Hello,
I don't think that there is an easier way than using a timer.
But maybe I'm wrong.
All the best,
Martin
|
|
|
|
|
|
I'm using WinForm, not ASP.NET.
|
|
|
|
|
The easiest way would be a Forms.Timer
|
|
|
|
|
I need to Remotely Get Encoder Statistics from a Windows Media Encoder 9 Running on a Remote Computer.
The SDK Documentation, only shows VB and C++ exampls. Is there any way to zaacess it through C#?
|
|
|
|
|
You really should wait way longer than 40 minutes before posting again about the same issue and with very little more information!
Spamming the boards won't get an answer any quicker and will probably make some people ignore you.
|
|
|
|
|
Hello.
Have been trying to search for the real working behind the concept of boxing/unboxing.
I understand the concept and its utility, but dont know what exactly happens behind the scene as per memory address and the apropos changes in the stack and heap memory.
Any information or reference will be of help.
Thanks.
|
|
|
|
|
|
www.kirupa.com
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
hi friends,
i am doing my project in c# with asp.net
i am using 12-hour format time and
i have two textboxes such as start time and reach time...
i want to compare two textboxes time values being entered...
compare validator is not working since i am using 12-hour format..
can u suggest me the alternative...
regards
gayathri...
gayathri
|
|
|
|
|
|
Hi,
Dont try to compare the strings without the help of DateTime.
Let the DateTime class parse your date strings, then compare the DateTime values.
|
|
|
|