.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Interview Question >> Others >> Post New Question Subscribe to Interview Questions


Posted By : LEANORD     Posted Date :October 10, 2011    Points :40   Category :Others 
Public statement variables are available to all procedures in all scripts.

You can also find related Interview Question to WHAT IS PUBLIC STATMENT?  below: 

What is the Scope of public/private/friend/protected/protected friend?

Scope of public/private/friend/protected/protected friend.

Visual Basic/Visual C#
Public/public All members in all classes and projects.

Private/private Members of the current class only.

Friend/internal All members in the current project.

Protected/protected All members in the current class and in classes derived from this member's class. Can be used only in member definitions, not for class or module definitions.

Protected Friend/protected internal All members in the current project and all members in classes derived from this member's class. Can be used only in member definitions, not for class
or module definitions. (More...)

How to make SharePoint website made available for public?

By default all the website created in SharePoint are private,However If you want your site to be a public Web site, enable anonymous access for the entire site. Then you can give out your URL to anybody in your business card, e-mail or any other marketing material. The URL for your Web site will be http://WebsiteName.wss.bcentral.comHence, please take special care to name your site.These Web sites are ideal for information and knowledge intensive sites and/or sites where you need to have shared Web workspace. Remember: Under each parent Web site, you can create up to 10 sub-sites each with unique permissions, settings and security rights. (More...)

Explain about public and protected Access Modifiers?


public is an access modifier for types and type members. This is the most permissive access level as there are no restrictions on accessing a public type or type member.


protected is an access modifier for type members only. A protected member is only accessible within the body of the containing type and from within any classes derived from the containing type (More...)

Consider the following code:

public class Example extends Thread
public void run()
System.out.println ("Hello");

public static void main (String args[])
new Example();

Select the correct option regarding the preceding code ?

1, The code will not compile.
2, The code will compile but will not execute.
3, The code will compile, execute, and display Hello as the output.
4, The code will compile, execute, but will not display anything.

Answer : 4 (More...)

Consider the following two classes:

public class Example1
public static int num;

public class Example2
public static void main(String[] args)

Select the correct option regarding the preceding classes.?

1, The Example2 class will execute without any output.
2, The Example2 class will execute with the following output:5

3, The Example2 class will not compile as it does not calls the constructor of the Example 1 class.
4, The Example2 class will not execute as it does not calls the constructor of the Example 1 class.

Answer : 2 (More...)

This is the progam using inheritence, what is the order of calling constructors and what is the output?
Public Class ConstructorEx
Public Class Class1
Dim a As Integer
Sub New()
a = 1
Console.WriteLine("a in initialized in Class1")
End Sub
End Class

Public Class Class2
Inherits Class1
Dim b As Integer
Sub New()
b = 1
Console.WriteLine("b in initialized in Class2")
End Sub
End Class
Public Class Class3
Inherits Class2
Dim c As Integer
Sub New()
c = 1
Console.WriteLine("c in initialized in Class2")
End Sub
End Class

Shared Sub main()
'Creation of the object of type Class3
Dim c As New Class3()
End Sub
End Class

In this example creation of the object of type class3 calls the Class3 constructor and that constructor calls Class2 Constructor Class2 Calls Class1 Constructor.So first Class1 constructor will execute and then control will be trasfered to class2 constructor,After executing the class2 constructor the control will be treansfered to Class3 constructor.

|---->Sub New()---------------------|
| 'First it will execute <-----|
| End Sub |
| |
| Class2 |
|--->Sub New()----------------------|
| 'Second it will execute<-------|
| End Sub |
| |
| Class3 |
----Sub New()-----------------------|
'Third this will executes<-----|
End Sub

Means In the Creation of the object of type C, First Class1 Constuctor initializes the data, then class2 then class3.

So output of this program is
a in initialized in Class1
b in initialized in Class2
c in initialized in Class3

What is Public or shared assemblies ?

These are static assemblies that must have a unique shared name and can be used by any application.
An application uses a private assembly by referring to the assembly using a static path or through an XML-based application configuration file. While the CLR doesn't enforce versioning policies-checking whether the correct version is used-for private assemblies, it ensures that an
application uses the correct shared assemblies with which the application was built. Thus, an application uses a specific shared assembly by referring to the specific shared assembly, and the CLR ensures that the correct version is loaded at runtime.

How to get all public types in an assembly?

Use GetExportedType() method on assembly.

Eg: Assembly assembly = Assembly.LoadFile(file);
var types = assembly.GetExportedTypes(); (More...)

Sharepoint anonymous|create public website??

Make a Public Site in SharePoint Yes you can make a public site in SharePoint, and it is actually not too confusing.
On SharePoint you want to create web application in central administration.

Next find authentication providers, followed by selecting enable anonymous, and save.

Find web application management, select site, under anonymous policy, check deny write. Simple orders to follow to Navigate to Site:

Choose Site Action
Select Site Setting
Select Site Permissions
And then click Anonymous Access, followed by Entire Website, then OK.

Now close all browsers and go back into the website again. Once back in if you did everything correctly you will be browsing as anonymous!

Shawn Zernik
www.internetworkconsulting.net (More...)

Class Statment

Class Declares the name of a class, as well as a definition of the variables, properties, and
methods that comprise the class (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend