Computer Abbreviation.Click here to find General Knowledge questions,General Knowledge preparation,General Knowledge puzzles etc. Power Electronics Interview Questions.What is holding current, latching current in SCR? This article lists some of the most frequently asked C# interview questions with their answers. Spring Interview Questions and Answers for Experienced/Beginners, Spring MVC interview questions, Spring Core, Spring Security, DAO, IOC and more. C# Interview Questions And Answers. C# is the best language for writing Microsoft . NET applications. C# provides the rapid application development found in Visual Basic with the power of C++. Interview Questions, Quizzes, Online Tests and Mock Tests. Interview Questions Bank. Android; Angular JS; Bootstrap; C Programming; C++; CICS; COBOL. Code: ae10 electrical engineering 1 code: ae10 subject: electrical engineering part - i typical questions & answers objective type questions. In this article, we will discuss some interesting problems on C language that can help students to brush up their C programming skills and help them prepare their C. Electrical Engineering interview questions and answers for freshers and experienced - List of Electrical Engineering questions with answers that might be asked during. EE please send basic electrical engineering interview questions and answers [email protected] Muhammed 03-23-2017 11:17 AM EEE.Its syntax is similar to C++ syntax and meets 1. OOPs like the following: Abstraction. Encapsulation. Polymorphism. 0 Answers /* The objective of this exercise is to build a road network connecting every pair of cities. Each city should be connected to each other city once. Our 1000+ Digital Signal Processing questions and answers focuses on all areas of DSP covering 100+ topics. These topics are chosen from a collection of most. ![]() Inheritance. To know more about C# Language read the following article: The latest version of C# is C# 6. What is an Object? According to MSDN, . An object is basically a block of memory that has been allocated and configured according to the blueprint. A program may create many objects of the same class. Objects are also called instances, and they can be stored in either a named variable or in an array or collection. Client code is the code that uses these variables to call the methods and access the public properties of the object. In an object- oriented language such as C#, a typical program consists of multiple objects interacting dynamically. To know more about object read the following links: 3. What is Managed or Unmanaged Code? Managed Code“The code, which is developed in . NET framework is known as managed code. This code is directly executed by CLR with the help of managed code execution. Any language that is written in . NET Framework is managed code”. Unmanaged Code. The code, which is developed outside . NET framework is known as unmanaged code.“Applications that do not run under the control of the CLR are said to be unmanaged, and certain languages such as C++ can be used to write such applications, which, for example, access low - level functions of the operating system. Background compatibility with the code of VB, ASP and COM are examples of unmanaged code”. Unmanaged code can be unmanaged source code and unmanaged compile code. Unmanaged code is executed with the help of wrapper classes. Wrapper classes are of two types: CCW (COM Callable Wrapper). RCW (Runtime Callable Wrapper). What is Boxing and Unboxing? Answer: Boxing and Unboxing both are used for type conversion but have some difference: Boxing: Boxing is the process of converting a value type data type to the object or to any interface data type which is implemented by this value type. When the CLR boxes a value means when CLR is converting a value type to Object Type, it wraps the value inside a System. Object and stores it on the heap area in application domain. Example: Unboxing: Unboxing is also a process which is used to extract the value type from the object or any implemented interface type. Boxing may be done implicitly, but unboxing have to be explicit by code. Example: The concept of boxing and unboxing underlines the C# unified view of the type system in which a value of any type can be treated as an object. For more details read this: 5. What is the difference between a struct and a class in C#? Answer: Class and struct both are the user defined data type but have some major difference: Struct. The struct is value type in C# and it inherits from System. Value Type. Struct is usually used for smaller amounts of data. Struct can’t be inherited to other type. A structure can't be abstract. No need to create object by new keyword. Do not have permission to create any default constructor. Class. The class is reference type in C# and it inherits from the System. Object Type. Classes are usually used for large amounts of data. Classes can be inherited to other class. A class can be abstract type. We can’t use an object of a class with using new keyword. We can create a default constructor. For more details just go with the following link: 6. What is the difference between Interface and Abstract Class? Answer: Theoretically their are some differences between Abstract Class and Interface which are listed below: A class can implement any number of interfaces but a subclass can at most use only one abstract class. An abstract class can have non- abstract methods (concrete methods) while in case of interface all the methods has to be abstract. An abstract class can declare or use any variables while an interface is not allowed to do so. In an abstract class all data member or functions are private by default while in interface all are public, we can’t change them manually. In an abstract class we need to use abstract keyword to declare abstract methods while in an interface we don’t need to use that. An abstract class can’t be used for multiple inheritance while interface can be used as multiple inheritance. An abstract class use constructor while in an interface we don’t have any type of constructor. To know more about the difference between Abstract Class and Interface go to the following link: 7. What is enum in C#? Answer: An enum is a value type with a set of related named constants often referred to as an enumerator list. The enum keyword is used to declare an enumeration. It is a primitive data type, which is user defined. An enum type can be an integer (float, int, byte, double etc.). But if you used beside int it has to be cast. An enum is used to create numeric constants in . NET framework. All the members of enum are of enum type. Their must be a numeric value for each enum type. The default underlying type of the enumeration element is int. By default, the first enumerator has the value 0, and the value of each successive enumerator is increased by 1. Dow . They are strongly typed, i. Enum can be displayed as a string and processed as an integer. The default type is int, and the approved types are byte, sbyte, short, ushort, uint, long, and ulong. Every enum type automatically derives from System. Enum and thus we can use System. Enum methods on enums. Enums are value types and are created on the stack and not on the heap. For more details follow the link: 8. What is the difference between “continue” and “break” statements in C#? Answer: Using break statement, you can 'jump out of a loop' whereas by using continue statement, you can 'jump over one iteration' and then resume your loop execution. Eg. Break Statement using System; using System. Collections; using System. Linq; using System. Text; namespace break. What is the difference between constant and read only in c#? Answer: Constant (const) and Readonly (readonly) both looks like same as per the uses but they have some differences: Constant is known as “const” keyword in C# which is also known immutable values which are known at compile time and do not change their values at run time like in any function or constructor for the life of application till the application is running. Readonly is known as “readonly” keyword in C# which is also known immutable values and are known at compile and run time and do not change their values at run time like in any function for the life of application till the application is running. You can assay their value by constructor when we call constructor with “new” keyword. See the example. We have a Test Class in which we have two variables one is readonly and another is constant. Test . What is the difference between ref and out keywords? Answer: In C Sharp (C#) we can have three types of parameters in a function. The parameters can be in parameter (which is not returned back to the caller of the function), out parameter and ref parameter. We have lots of differences in both of them. For more details go to the following link: 1. Can “this” be used within a static method? Answer: We can't use this in static method because keyword 'this' returns a reference to the current instance of the class containing it. Static methods (or any static member) do not belong to a particular instance. They exist without creating an instance of the class and call with the name of a class not by instance so we can’t use this keyword in the body of static Methods, but in case of Extension Methods we can use it the functions parameters. Let’s have a look on “this” keyword. The . For example, consider the following class written in C#. For more follow this link: 1. Define Property in C#. Answer: Properties are members that provide a flexible mechanism to read, write or compute the values of private fields, in other words by the property we can access private fields. In other words we can say that a property is a return type function/method with one parameter or without a parameter. These are always public data members. It uses methods to access and assign values to private fields called accessors. Now question is what are accessors? The get and set portions or blocks of a property are called accessors. These are useful to restrict the accessibility of a property, the set accessor specifies that we can assign a value to a private field in a property and without the set accessor property it is like a read- only field. By the get accessor we can access the value of the private field, in other words it returns a single value. A Get accessor specifies that we can access the value of a field publically. We have the three types of properties Read/Write. Read. Only. Write. Only. For more details follow the link: 1. What is extension method in c# and how to use them? Answer: Extension methods enable you to add methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. An extension method is a special kind of static method, but they are called as if they were instance methods on the extended type. How to use extension methods? An extension method is a static method of a static class, where the . The type of the first parameter will be the type that is extended. Extension methods are only in scope when you explicitly import the namespace into your source code with a using directive. Like: suppose we have a class like bellow: public class Class. What is the difference between dispose and finalize methods in c#? Answer: finalizer and dispose both are used for same task like to free unmanaged resources but have some differences see. Finalize: Finalize used to free unmanaged resources those are not in use like files, database connections in application domain and more, held by an object before that object is destroyed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
August 2017
Categories |