Search Results

Search found 6 results on 1 pages for 'realitydysfunction'.

Page 1/1 | 1 

  • Abstract class + Inheritance vs Interface

    - by RealityDysfunction
    Hello fellow programmers, I am reading a book on C# and the author is comparing Abstract classes and Interfaces. He claims that if you have the following "abstract class:" abstract class CloneableType { public abstract object Clone(); } Then you cannot do this: public class MiniVan : Car, CloneableType {} This, I understand. However he claims that because of this inability to do multiple inheritance that you should use an interface for CloneableType, like so: public interface ICloneable { object Clone(); } My question is, isn't this somewhat misleading, because you can create an abstract class which is "above" class Car with the method Clone, then have Car inherit that class and then Minivan will inherit Car with all these methods, CloneAble class - Car class - Minivan Class. What do you think? Thanks.

    Read the article

  • creating object parameters in {}?

    - by RealityDysfunction
    I am trying to decode a piece of code from a book: List<Person> people = new List<Person>() { new Person {FirstName="Homer",LastName="Simpson",Age=47}, new Person {FirstName="Marge",LastName="Simpson",Age=45} }; Person is just a simple class they made, with a bunch of fields: Name, Last Name, etc... What I don't understand is, don't we send parameters to a constructor of Person in non-curly brackets? I tried replicating this code, but it doesn't seem to fly, any takers? Thanks for input.

    Read the article

  • ASP.NET book for desktop programmer. [closed]

    - by RealityDysfunction
    Fellow programmers, I have been learning C# for a while now, but my ultimate goal is to develop ASP.NET applications. A few ASP.NET books I looked at either start with absolute basics...What is C#? What is a function...or Assume that I have developed web apps in other languages like PHP...I am looking for a book that is tailored for people who already know desktop programming but wish to learn ASP.NET. Did anybody come across such a book? Many Thanks.

    Read the article

  • Being hire-able [closed]

    - by RealityDysfunction
    Hello fellow developers, I am in my last year of Undergrad (Applied Math). I have discovered my passion for programming after taking a programming course (required by program), it was a basic Java course but I loved it! So I picked up an Apress C# Pro by Andrew Troelsen book. My degree is not in CompSci and I have under a year left to graduation. How do I prove myself as a programmer? What would you recommend I do in order to become hire-able?

    Read the article

  • Instantiating Interfaces in C#?

    - by RealityDysfunction
    I am reading/learning about interfaces in C# at the moment, and thus far I managed to understand how it differs from an abstract class. In the book I am reading the author explains that interfaces are the ultimate abstract class and that it simply sets the standard of certain methods the inheriting class will have, but then provides the following example... static void Main(string[] args) { ... Circle c = new Circle("Lisa"); IPointy itPt = null; try { itPt = (IPointy)c; Console.WriteLine.(itPt.Points); } catch (InvalidCastException e) { Console.WriteLine(e.Message); } ... } The line that absolutely throws me off is the "IPointy itfPt=null;" did he just declare an interface??? I thought interfaces are abstract and can only be inherited? What kind of sorcery is going on here? Thanks for any help, I

    Read the article

  • sql error validating the default for column

    - by RealityDysfunction
    I am trying to set the default value for a new column I just added. In properties I am trying to set 'Default Value or Binding' to a simple XML along the lines of: <root><title>Welcome</title><body>Thank you for your time.</body></root> However, when I click away, I get "sql error validating the default for column," I set this value in other numerical columns and it worked fine. What gives?

    Read the article

1