Last active
November 26, 2019 15:46
-
-
Save supreettare/045ea23b995662061f2d6bcee34900e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Taritas | |
| { | |
| static void Main(string[] args) | |
| { | |
| Y bObj= new Y(2); | |
| Console.ReadLine(); | |
| } | |
| } | |
| public class X | |
| { | |
| public X() | |
| { | |
| Console.WriteLine("Hi you are in class X"); | |
| } | |
| public X(int x) | |
| { | |
| } | |
| } | |
| public class Y:X | |
| { | |
| public Y() | |
| { | |
| Console.WriteLine("Hi you are in class Y"); | |
| } | |
| } |
Error : we cannot pass value in Y bObj = new Y(2);
we cannot pass value in Y bib=new Y(2);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi you are in class Y