May 9, 2019

Srikaanth

TIBCO Software C# Interview Questions Answers

Explain Manifest & Metadata.

Manifest 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.

Manifest: 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.

Difference Between Value And Reference Type. What Are Value Types And Reference Types?

Value type - bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short, strut, uint, ulong, ushort
Value types are stored in the Stack
Reference type - class, delegate, interface, object, string
Reference types are stored in the Heap

What Are The Two Kinds Of Properties

Two types of properties in .Net: Get and Set

Explain Constructor.

Constructor is a method in the class which has the same name as the class (in VB.Net its New()). It initializes the member attributes whenever an instance of the class is created.

Describe Ways Of Cleaning Up Objects.

There is a perfect tool provide by .net frameworks calls Garbage collector, where by mean of GC we can clean up the object and reclaim the memory. The namespace used is System.GC

the run time will maintain a service called as garbage collector. This service will take care of deallocating memory corresponding to objects. it works as a thread with least priority. when application demands for memory the runtime will take care of setting the high priority for the garbage collector, so that it will be called for execution and memory will be released. the programmer can make a call to garbage collector by using GC class in system name space.

How Can You Clean Up Objects Holding Resources From Within The Code?

Call the dispose method from code for clean up of objects.

Which Controls Do Not Have Events?

Timer control.

What Is The Maximum Size Of The Textbox?

65536.
TIBCO Software Most Frequently Asked Latest C# Interview Questions Answers
TIBCO Software Most Frequently Asked Latest C# Interview Questions Answers

Which Property Of The Textbox Cannot Be Changed At Runtime?

Locked Property.

Which Control Cannot Be Placed In Mdi?

The controls that do not have events.

What Is The Difference Between Proc. Sent By Val And By Sub?

BY VAL: changes will not be reflected back to the variable.
By REF: changes will be reflected back to that variable.( same as & symbol in c, c++)

What's The Advantage Of Using System.text.stringbuilder Over System.string?

StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.

What's The Difference Between The System.array.copyto() And System.array.clone()?

The first one performs a deep copy of the array, the second one is shallow


How Can I Process Command-line Arguments?

Like this
using System;
class CApp
{
public static void Main( string[] args )
{
Console.WriteLine( "You passed the following arguments:" );
foreach( string arg in args )
Console.WriteLine( arg );
}
}

Does C# Do Array Bounds Checking?

Yes. An IndexOutOfRange exception is used to signal an error.

How Can I Make Sure My C# Classes Will Interoperate With Other .net Languages?

Make sure your C# code conforms to the Common Language Subset (CLS). To help with this, add the [assembly:CLSCompliant(true)] global attribute to your C# source files. The compiler will emit an error if you use a C# feature which is not CLS-compliant.

How Do I Use The 'using' Keyword With Multiple Objects?

You can nest using statements, like this
using( obj1 )
{
using( obj2 )
{
...
}
}

However consider using this more aesthetically pleasing (but functionally identical) formatting
using( obj1 )
using( obj2 )
{
...
}

What Is The Difference Between == And Object.equals?

For value types, == and Equals() usually compare two objects by value. For example
int x = 10;
int y = 10;
Console.WriteLine( x == y );
Console.WriteLine( x.Equals(y) );
will display
True
True

However things are more complex for reference types. Generally speaking, for reference types == is expected to perform an identity comparison, i.e. it will only return true if both references point to the same object. By contrast, Equals() is expected to perform a value comparison, i.e. it will return true if the references point to objects that are equivalent. For example
StringBuilder s1 = new StringBuilder("fred");
StringBuilder s2 = new StringBuilder("fred");
Console.WriteLine( s1 == s2 );
Console.WriteLine( s1.Equals(s2) );
will display
False
True

s1 and s2 are different objects (hence == returns false), but they are equivalent (hence Equals() returns true).

Unfortunately there are exceptions to these rules. The implementation of Equals() in System.Object (the one you'll inherit by default if you write a class) compares identity, i.e. it's the same as operator==. So Equals() only tests for equivalence if the class author overrides the method (and implements it correctly). Another exception is the string class - its operator== compares value rather than identity.

Bottom line: If you want to perform an identity comparison use the ReferenceEquals() method. If you want to perform a value comparison, use Equals() but be aware that it will only work if the type has overridden the default implementation. Avoid operator== with reference types (except perhaps strings), as it's simply too ambiguous.

How Do I Enforce Const Correctness In C#?

You can't - at least not in the same way you do in C++. C# (actually, the CLI) has no real concept of const correctness, For example, there's no way to specify that a method should not modify an argument passed in to it. And there's no way to specify that a method does not modify the object on which it is acting.

To get a feel for the angst this causes among some C++ programmers, read the feedback on this post from Raymond Chen.

There are of course ways of addressing this issue. For example, see Brad Abram's post (and associated feedback) for some ideas on adding optional read-only behaviour to collection classes.

What Are The New Features In C# 2.0?

Support for all of the new framework features such as generics, anonymous methods, partial classes, iterators and static classes.

Delegate inference is a new feature of the C# compiler which makes delegate usage a little simpler. It allows you to write this
Thread t = new Thread(ThreadFunc);
instead of this
Thread t = new Thread( new ThreadStart(ThreadFunc) );

Another minor but welcome addition is the explicit global namespace, which fixes a hole in namespace usage in C# 1.x. You can prefix a type name with global:: to indicate that the type belongs to the global namespace, thus avoiding problems where the compiler infers the namespace and gets it wrong.

Finally C# 2.0 includes some syntactic sugar for the new System.Nullable type. You can use T? as a synonym for System.Nullable<T>, where T is a value type. As suggested by the name, this allows values of the type to be 'null', or 'undefined'.

https://mytecbooks.blogspot.com/2019/05/tibco-software-c-interview-questions.html
Subscribe to get more Posts :