Question
a) class Program
{
static void Main(string[] args)
{
import n1;
csharp x = new csharp();
x.fun();
import n2;
csharp y = new csharp();
y.fun();
}
}
b) import n1;
import n2;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
n1.csharp x = new n1.csharp();
x.fun();
import n2;
n2.csharp y = new n2.csharp();
y.fun();
}
}
}
c) class Program
{
static void Main(string[] args)
{
using n1;
csharp x = new csharp();
x.fun();
using n2;
csharp y = new csharp();
y.fun();
}
}
d) using n1;
using n2;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
n1.csharp x = new n1.csharp();
x.fun();
import n2;
n2.csharp y = new n2.csharp();
y.fun();
}
}
}
a.
a
b.
b
c.
c
d.
d
Posted under C# programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. If a class named csharp is present in namespace n1 as well as in namespace n2,then which of the following is the correct way to use csharp class?
Similar Questions
Discover Related MCQs
Q. If ListBox is the class of System.Windows.Forms namespace.Then,correct way to create an object of ListBox class is?
View solution
Q. Which among the following is the correct statement about the using statement used in C#.NET?
View solution
Q. Choose the symbol which begins a preprocessor directive in C#.NET?
View solution
Q. What is meant by preprocessor directive in C#.NET?
View solution
Q. What is meant by preprocessor directive #define?
View solution
Q. Select the defined preprocessor in C#.NET?
View solution
Q. What does preprocessor directive #if and #endif explains?
View solution
Q. Which preprocessor directive among the following forces the compiler to stop the compilation?
View solution
Q. Which among the following is not a preprocessor directive?
View solution
Q. Which of these data types can be used for a method having a return statement in it?
View solution
Q. What is the process of defining more than one method in a class differentiated by parameters known as?
View solution
Q. Which of these methods is executed first before execution of any other thing that takes place in a program?
View solution
Q. Which of these can be used to differentiate two or more methods having same name?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C# programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!