answersLogoWhite

0

C Sharp

C Sharp is a programming language developed by Microsoft Corporation. It is designed to be a simple, general-purpose, modern, object-oriented programming language. The latest version is C# 4.0. It is designed for developing applications for both embedded and hosted systems.

343 Questions

What is the default accessibility of a delegate in C sharp.net?

It depends on the context (stand alone, within or outside of a class). Because it is context sensitive, I prefer to declare it the accessibility explicitly to avoid the confusion.

What is exception handling in object oriented languages?

Exception is a event which can interrupt a normal flow of your program. In other way, exception is a abnormal condition which can occur during the execution of a program. Yes , we can handle exceptions through try, catch, finally, throw and throws.

Can you use objects in class level declaration?

Objects are classes... It's the most abstract type of data.

What is the best way to learn how to paraphase?

1. Read the material and make sure that you really understand what it is saying. 2. Pretend that you are teaching someone else about this material, and explain it to them - this is called "using your own words" or paraphrasing. 3. It is usually best to check your version against the original - ask an adult or another student (one who is making good grades) to listen to you (or to read over your paraphrase) and tell you if you have left anything out or misunderstood it.

What is the difference between Strings and Arrays in c?

There is no difference. A string is just an array of type char. The only real difference is that we do not need to keep track of the length of a string because strings are null-terminated in C. If a string does not have a null-terminator, then it is just an ordinary array of character values.

How do you write a procedure?

Definition:

A written procedure is a step-by-step guide to direct the reader through a task.

Advice:

Read this procedure all the way through before you begin to write.

Preparation:

Step 1. Provide a purpose statement (why this procedure).

Step 2. Provide an overview of the procedure.

Step 3. Identify prerequisite knowledge and skills, if any.

Step 4. Highlight any safety issues and other precautions.

Step 5. Add a list of equipment, supplies, or parts needed for the procedure.

Writing:

Step 6. Define a logical sequence of steps and substeps, neither too large nor too small.

a. Use the imperative voice for clarity and economy of words.

b. Write to the level of the reader's ability or a little below. Define unfamiliar terms.

Step 7. Include hints and helps.

Step 8. Add illustrations, analogies, models, anything that will aid understanding of the process and the end product.

Follow up:

Step 9. Pilot test your procedure. Is it understandable, effective, complete? Does it result inefficient and effective performance?

Step 10. Inform the reader of the performance standard to be applied when the procedure is a practiced skill.

What is relationship between process and thread?

Process --1------------m-- Threads

1 process to many threads

Bring up your Task Manager (if you are using a windows), Performance tap, you can see the number of process and the number of threads, usually the number of threads is a lot higher than the number of processes.

What is topsis method?

Technique for Ordered Preference by Similarity to ideal solution

How do you call variable value declare in one class call to another class?

From the face value of the question, they are called message chain, or train rack (if one of them is null!?)

Design iterative and recursive alogrithm to find the minimum among n elements?

// returns the minimum value in ns - iterative

public static final int findMinIterative(final int[] ns) {

if (ns.length == 0) {

return 0; // return 0 if ns is an empty array

}

// search each element of ns

int min = ns[0];

for (int i = 0; i < ns.length; ++i) {

// if an element smaller than min is found, store that as the new min

if (ns[i] < min) {

min = ns[i];

}

}

return min;

}

// returns the minimum value in ns - recursive

// Note that this problem does not lend itself to recursion; the solution is very similar to the iterative approach

public static final int findMinRecursive(final int[] ns) {

if (ns.length == 0) {

return 0; // return 0 if ns is an empty array

}

// start recursion

return findMinRecursive(0, ns[0], ns);

}

// recursive part of algorithm

private static final int findMinRecursive(final int i, final int min, final int[] ns) {

// bounds check

if (i >= ns.length) {

return min;

}

// recurse on next value of ns

return findMinRecursive(i + 1, Math.min(min, ns[i]), ns);

}

How many constructors does class Exception have?

The Exception class has 4 constructors. They are:

a. Exception()

b. Exception(String arg)

c. Exception(String arg, Throwable arg1)

d. Exception(Throwable arg)

What is the difference between the class and the entity?

A class is a type. An entity is a object created from this type. A class is like a definition and the entity behaves as per this definition.

What are the application of colloids?

Applications of colloids are unlimited. Colloids find its applications in everyday life phenomena. Some of important applications of colloids are discussed.

Purification of waterWater contains colloidal impurities .These impurities can be weeded out by using electrolyte like Alum. Alum is positively charged Al3+ ion which attracts negatively charged colloidal impurities. These neutralized particles settle down and pure water is decanted off. Thus Alum is used to remove dirt and impurities present in the colloidal solution. Food ItemsLarge numbers of food articles which we use in our daily life are colloidal in nature. For example, milk, butter and ice creams are colloidal in nature. MedicineMost of the medicines are colloidal in nature. Colloidal calcium and gold are administered by injections to raise the vitality of human system. Smoke Precipitation using Cottrell precipitatorColloidal particles of Smoke and dust are major source of pollution in big industrial cities. Smoke precipitation is technique of precipitating smoke particles present in air.

Smoke particles are the electrically charged colloidal particle suspended in air. To remove these particles from air, Cottrell precipitator is used. Cottrell precipitator uses principle of electrophoreses (movement of colloidal particles under influence of electric field) to weed out smoke particles. Air containing smoke and dust particles are allowed to pass through metal electrodes present inside Cottrell precipitator. These charged particles moves towards oppositely charged electrodes and get deposited there from which they are scrapped mechanical

Sewage disposalDirt and mud particles are electrically charged. By applying electric field in sewage tank, dirt particles reach the oppositely charged electrode, get neutralized and are coagulated. These coagulated particles are suspended in solution and are easily removed. Artificial rainColloids find another application in producing artificial rain. Cloud consists of charged particles of water dispersed in air. These particles are neutralized by spraying oppositely charged particles over a cloud. These neutralized particles of water combine to form large water drops. Thus, artificial rain is caused by the aggregation of minute particles of water to form large particles.

If we interchange public static and void main then what happens?

Making main static is probably not a good idea; it may keep the linker from recognizing the program entry point. main is not a method, so it cannot be anything but public, for all intents and purposes. Declaring main to have a void return and/or with a void argument list is usually harmless, although it limits how your program can interact with the OS.

What is the difference between destructors in c plus plus and c sharp?

In C# only class instances can have a destructor, whereas both class and struct instances can have a destructor in C++. While syntactically similar, a C++ destructor executes exactly as written, whereas a C# destructor merely provides the body of the try clause of the class' finalize method.

What is the function of catch Exception E?

In Java, if there is a run-time error then it allows the user to explicitly handle it by catching it in the catch block. If there is any error in the try block of code, automatically the flow control will be transferred to the catch block. Here Exception e indicates any exception. The same is true in both Visual Basic and C#. This is seen in the

try {}

catch (Exception e) {}

blocks. Which then function as the previous poster said.

== == == ==

What is meaning of net in dot net?

The net in .net means either interNET or NETwork

How are exceptions generated?

Exceptions are generated by the Java Virtual Machine during program execution. When the JVM comes across a piece of code that it cannot execute properly or a piece of code that will create issues when the JVM executes it will generate an exception. Ex: divide by 0 or trying to access a null variable etc

The language also has syntax that can catch and handle these situations. It is called the try - catch - finally construct.