About Me

All about Real time requirements in Orale Stay Tune!!

Sunday, April 6, 2008

C# INTERVIEW QUESTIONS

Difference between a sub and a function.

Answer1A Sub does not return anything whereas a Function returns something.

Answer2-A Sub Procedure is a method will not return a value-A sub procedure will be defined with a “Sub” keywordSub ShowName(ByVal myName As String)Console.WriteLine(”My name is: ” & myName)End Sub-A function is a method that will return value(s).

-A function will be defined with a “Function” keywordFunction FindSum(ByVal num1 As Integer, ByVal num2 As Integer) As IntegerDim sum As Integer = num1 + num2Return sumEnd Function.

Explain manifest & metadata.

Answer1Manifest is metadata about assemblies. Metadata is machine-readable information about a resource, or “”data about data.” In .NET, metadata includes type definitions, version information, external assembly references, and other standardized information.

Answer2Manifest: Manifest describes assembly itself. Assembly Name, version number, culture, strong name, list of all files, Type references, and referenced assemblies.Metadata: Metadata describes contents in an assembly classes, interfaces, enums, structs, etc., and their containing namespaces, the name of each type, its visibility/scope, its base class, the nterfaces it implemented, its methods and their scope, and each method’s parameters, type’s properties, and so on.

Difference between imperative and interrogative code.

There are imperative and interrogative functions. Imperative functions are the one which return a value while the interrogative functions do not return a value.


0 comments: