Search the web
Sign In
New User? Sign Up
CSharpDotNetGreek · C Sharp and dotNet Greek
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
contructor overload ref/eDN8053035157   Message List  
Reply | Forward Message #28 of 41 |

Hello guys!!!

 

namespace ConsoleApplication3

{

    class Program

    {

 

        public Program(string[] args) { Console.WriteLine("this is the constructor: {0}", args[0]); }

        public Program(string anarg) : this(anarg) { }

    }

}

 

Αυτό που θέλω να κάνω είναι το overload να δίνει την παράμετρο anarg, ένα string αντί string[]. Δεν το δέχεται όμως ο compiler. Με ποιον τρόπο πρέπει να συντάξω το overload?

 

Friendly dennis

 



Tue Mar 18, 2008 9:17 am

fdennis090
Offline Offline
Send Email Send Email

Forward
Message #28 of 41 |
Expand Messages Author Sort by Date

Hello guys!!! namespace ConsoleApplication3 { class Program { public Program(string[] args) { Console.WriteLine("this is the constructor: {0}", args[0]); } ...
dennis
fdennis090
Offline Send Email
Mar 18, 2008
9:17 am

... Διονύση η γραμμή public Program(string anarg) : this(anarg) { } δεν είναι σωστή η this(anarg) πάει να περάσει...
Theodoros Bebekis
bebekis
Offline Send Email
Mar 18, 2008
9:28 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help