Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is shadowing?

Answer Posted / sonia.sardana

If there are overloaded methods in the base class, & u
marks one of the methods as shadows using the keyword
shadow in the derived class, then we cannot access the
overloaded methods.

Ex-
public class base
public sub test()
console.writeline("sonia")
end sub

public sub test(i as integer)
console.writeline(i)
end sub

end class

public sub derived
inherirts base
shadows sub test(x as integer)
console.writeline("Shadow method")
end sub
end class


sub main()
dim obj as new derived
obj.test()-->Invalid
obj.test(10)-->Valid
end sub

Is This Answer Correct ?    22 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of internal keyword?

967


What are nested classes?

925


Explain the use of serialization and deserialization?

1055


Explain how to store decimal data in .net?

1159


Explain strong name in .net assembly?

965


What is datatype conversion?

1102


Explain nested classes?

950


Define naming convention?

1004


Explain jit?

1070


What is a stream in vb.net?

974


what is interface and when it is used?

2259


Define serialization in .net?

1134


What is late binding?

939


Explain cls?

992


Name some of the keywords used in vb.net?

1003