RSS Forums RSS

different syntax for extending a class?

Please support our C# advertiser: DiscountASP.NET – 3 Months Free on C# Web Hosting
Reply
Posts: 4
Reputation: legend_018 is an unknown quantity at this point 
Solved Threads: 0
legend_018 legend_018 is offline Offline
Newbie Poster

different syntax for extending a class?

  #1  
Oct 9th, 2008
I was looking at a tutorial for when you extend a class. One tutorial said you used a keyword extends between the two class names and another tutorial said you used a period between the two class names to join the two classes together. Both of them are c# tutorials.

Not that it's a big deal, but are they both correct? They both seem to be decent tutorials for the most part. I'm sort of doing a side by side comparison with 2 tutorials. Sometimes one of the tutorials will explain something better than the other and vice versa.

Thanks in advance
AddThis Social Bookmark Button
Reply With Quote  
Posts: 505
Reputation: selvaganapathy is an unknown quantity at this point 
Solved Threads: 87
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Posting Pro

Re: different syntax for extending a class?

  #2  
Oct 9th, 2008
Hi,

One tutorial said you used a keyword extends between the two class names

In C#, we use colon ( : ) to extend from one class. Java language uses this extends keyword to inherit from a class.

If u have doubt like this, try it practically with these two types. You get the Answer
Last edited by selvaganapathy : Oct 9th, 2008 at 11:16 pm.
KSG
Reply With Quote  
Posts: 1,734
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 184
LizR LizR is offline Offline
Posting Virtuoso

Re: different syntax for extending a class?

  #3  
Oct 10th, 2008
perhaps what you saw on the tutorial (link it if you could) was something where it was taking "myapp.myclass" and extending it.. where where myapp is the name space and myclass being the actual class being extended
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the C# Forum
Views: 1167 | Replies: 2 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:47 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC