Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

my 1st attempt...already stuck!

$
0
0
Hi All

This is my 1st attempt at teaching myself C/C++ so please forgive my ignorance but I'm stuck on 2 questions I have.

1) Correct this class


namespace ExampleApp
{
    /// <summary>
    /// Correct this class so that it would compile
    /// </summary>
    public class Customer
    {
        public string Name { get; set; }
        public string Account { get set; }

        public string PrefixedAccount
        {
            get
            {
                return "P" Account;
            }
        }        

        public override string ToString()
        {
            return Account + " - " + Name;
        }
    }
}



I can see 1 glaring error but there are more and I'm totally stuck! Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>