-
Can static methods be overridable?
A) YesB) NoC) It depends on how we declare themExplanation: Static methods cannot be overridable
-
What is the use of fixed statement
A) To stop the garbagecollector to move the objects in useB) To dispose the object at the end of the defined scopeC) To tell the garbage collector to move the object is useD) To fix the size of an object.
-
-
-
-
-
AJAX in C#
How to implement AJAX in C#?
-
C# program to count first 50 number divisible by 3
How to write c# program to count first 50 number divisible by 3 or 4.how to write c# program to count first 50 number divisible by 3 and 4.
-
How do I port "synchronized" functions from Visual J++ to C#?
Original Visual J++ code: public synchronized void Run() {// function body}Ported C# code: class C{public void Run(){lock(this){// function body }}public static void Main() {}}
-
From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
With regard to versioning, interfaces are less flexible than classes. With a class, you can ship version 1 and then, in version 2, decide to add another method. As long as the method is not abstract (i.e., as long as you provide a default implementation of the method), any existing derived classes continue to function with no changes. Because interfaces do not support implementation inheritance, this...
-
What optimizations does the C# compiler perform when you use the /optimize+ compiler option?
The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned).We get rid of unreachable code.We get rid of try-catch w/ an empty try.We get rid of try-finally w/ an empty try (convert to normal code...).We get rid of try-finally w/ an empty finally (convert to normal code...).We optimize branches over branches:...
-
How can I create a process that is running a supplied native executable (e.g., cmd.exe)?
The following code should run the executable and wait for it to exit before continuing: using System;using System.Diagnostics;public class ProcessTest {public static void Main(string[] args) {Process p = Process.Start(args[0]);p.WaitForExit();Console.WriteLine(args[0] + " exited.");}} Remember to add a reference to System.Diagnostics.dll when you compile.
-
-
-
-
Program on 3d matrix using random function print the o/p in file.
program on 3d matrix using random function print the o/p in file
find the even,odd,prime numbers from above output file.
please do needful help
thank you -
Wap on 3d matrix by using random function print o/p in a file.
Wap on 3d matrix by using random function print in a file.
Find the prime numbers from out put of above program.
Find the even numbers from o/p of 1st program.
Find the odd numbers from o/p of 1st program.
-
-
-
C# Interview Questions
Ans