ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  VB.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What is shadowing?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is shadowing?
Answer
# 1
When global and local varible  in the same name.
the local varibale in a mehod or function which use to 
override the global is called the shadowing.
ie the Global varible is being shadowed by the 
local varible
 
Is This Answer Correct ?    14 Yes 2 No
Manikandan
 
  Re: What is shadowing?
Answer
# 2
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 ?    12 Yes 2 No
Sonia.sardana
 
 
 
  Re: What is shadowing?
Answer
# 3
Whatever the code written by Sonia.sardana is shows the 
shadowing concept but there is some print mistakes in the 
code.The correct code is---


imports system
module m1 
public class base
 Public Sub test()
        Console.WriteLine("sonia")
    End Sub

    Public Sub test(ByVal i As Integer)
        Console.WriteLine(i)
    End Sub

End Class

Public class derived
    inherits base

Shadows Sub test(ByVal x As Integer)
    Console.WriteLine("Shadow method")
End Sub
end class


Sub main()
    Dim obj As New derived
obj.test()  'This will show error
obj.test(10) 'This is valid
End Sub
    
end module
 
Is This Answer Correct ?    1 Yes 1 No
Rohit
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
when a program of vb.net is written in notepad it occupies always 1kb of memory why?  1
what are Fixed memory leaks and threads locking problems.  1
Advantage of vb.net over vb ? Digital-GlobalSoft5
What are the objects in asp.net and tell the purpose of those objects Ascent2
What is the Difference between CLR & CTS?  2
What is an abstract class?  3
How do you do multithreading application in VB ? Satyam4
how to restore database using vb.net? TCS4
Why Datareader is useful?  5
how to call a list box on the text if some one send me the code for it  1
How do you rate yourself in .NET ? Infosys3
What is the DIfference between Friend and Protected Friend? CTS5
how to create views in sql with syntax and example  5
what is the dif b/w panel and groupbox. Ksb3
Is VB.NET object oriented? What are the inheritances does VB.NET support ? Digital-GlobalSoft11
What is the relation between Garbage collector and finalize and destructor? Kanbay2
what do you mean by .Net Framework Guru-Tech11
ColumnMapping belongs to which namespaces?  1
how to send data to exe file? my code has a button when i press it, an exe file will open. how can i send data as input to the exe file?  2
What is DLL hell?  2
 
For more VB.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com