S.Sakthi Vinayagam Sr. AP/CSE, C.Arun AP/IT

Similar documents
B.E /B.TECH DEGREE EXAMINATIONS,

INTRODUCTION TO.NET. Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.)


UNIT 1 PART A PART B

DOT NET Syllabus (6 Months)

.NET-6Weeks Project Based Training

C# Syllabus. MS.NET Framework Introduction

DOT NET SYLLABUS FOR 6 MONTHS

.Net Interview Questions

Saikat Banerjee Page 1

Program Contents: DOTNET TRAINING IN CHENNAI

.Net. Course Content ASP.NET

Department of Computer Applications

C#: framework overview and in-the-small features

.NET Advance Package Syllabus

Microsoft.NET Programming (C#, ASP.NET,ADO.NET, VB.NET, Crystal Report, Sql Server) Goal: Make the learner proficient in the usage of MS Technologies

Dot Net Online Training

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

C# Programming in the.net Framework

OVERVIEW ENVIRONMENT PROGRAM STRUCTURE BASIC SYNTAX DATA TYPES TYPE CONVERSION

Introduce C# as Object Oriented programming language. Explain, tokens,

DOT NET COURSE BROCHURE

Course Syllabus C # Course Title. Who should attend? Course Description

Course Hours

C++\CLI. Jim Fawcett CSE687-OnLine Object Oriented Design Summer 2017

C# 6.0 in a nutshell / Joseph Albahari & Ben Albahari. 6th ed. Beijin [etc.], cop Spis treści

Object-Oriented Programming

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class.

PES INSTITUTE OF TECHNOLOGY

Migrate Your Skills to Microsoft.NET Framework 2.0 and 3.0 using Visual Studio 2005 (C#)

PESIT- Bangalore South Campus Hosur Road (1km Before Electronic city) Bangalore

.Net Technologies. Components of.net Framework

.NET FRAMEWORK. Visual C#.Net

Mastering VB.NET using Visual Studio 2010 Course Length: 5 days Price: $2,500

Microsoft. Microsoft Visual C# Step by Step. John Sharp

.NET 4.6 MICROSOFT CURRICULUM MICROSOFT.NET 2015 (4.6)

Apex TG India Pvt. Ltd.

Prerequisites: The student should have programming experience in a high-level language. ITCourseware, LLC Page 1. Object-Oriented Programming in C#

ALPHAPRIMETECH 112 New South Road, Hicksville, NY 11801

Top 40.NET Interview Questions & Answers

Object-Oriented Programming in C# (VS 2015)

Chapter 12 Microsoft Assemblies. Software Architecture Microsoft Assemblies 1

Object-Oriented Programming in C# (VS 2012)

CETPA INFOTECH PVT. LTD.

C# Programming: From Problem Analysis to Program Design. Fourth Edition

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net

DC69 C# &.NET DEC 2015

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com

SECURED PROGRAMMING IN.NET DETAILED TRAINING CONTENT INDUSTRIAL TRAINING PROGRAM ( )

VALLIAMMAI ENGINEERING COLLEGE

OOPs Concepts. 1. Data Hiding 2. Encapsulation 3. Abstraction 4. Is-A Relationship 5. Method Signature 6. Polymorphism 7. Constructors 8.

6 Months Training Module in.net Module 1-Total Days-20

New programming language introduced by Microsoft contained in its.net technology Uses many of the best features of C++, Java, Visual Basic, and other

M.C.A. (CRCS) (Sem.-IV) Examination May-2014 Paper: CCA Net Framework and C# Faculty Code: 003 Subject Code:

C# Programming Syllabus

HCIM SUMMER WORKSHOP Introduction to C#

University of West Bohemia in Pilsen. Faculty of Applied Sciences. Department of Computer Science and Engineering DIPLOMA THESIS

Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#)

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

A NET Refresher

Question And Answer.

M4.1-R4: APPLICATION OF.NET TECHNOLOGY

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

Chapter 1:- Introduction to.net. Compiled By:- Ankit Shah Assistant Professor, SVBIT.

Introduction to Programming Using Java (98-388)

Microsoft ASP.NET Whole Course Syllabus upto Developer Module (Including all three module Primary.NET + Advance Course Techniques+ Developer Tricks)

Software Development & Education Center Complete.NET 4.5

Sri Vidya College of Engineering & Technology

EEE-425 Programming Languages (2013) 1

SERVICE-ORIENTED COMPUTING

C++ for System Developers with Design Pattern

QUESTION BANK: INTRODUCTION TO PROGRAMMING (HCS102) a. Compare and contrast unboxing and widening using code snippets [10]

Table of Contents Preface Bare Necessities... 17

.NET, C#, and ASP.NET p. 1 What Is.NET? p. 2 The Common Language Runtime p. 2 Introducing C# p. 3 Introducing ASP.NET p. 4 Getting Started p.

C# is intended to be a simple, modern, general-purpose, objectoriented programming language. Its development team is led by Anders Hejlsberg.

TECHNOLOGIES. Kick Starting OOPS &.Net Encapsulation Ø Class Ø Struct Ø Interface, Ø Enum Ø Abstraction Ø Access modifiers in.net

Microsoft Visual C# Step by Step. John Sharp

Learning C# 3.0. Jesse Liberty and Brian MacDonald O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo

Expert C++/CLI:.NET for Visual C++ Programmers

M Introduction to C# Programming with Microsoft.NET - 5 Day Course

Introduction to C++/CLI 3. What C++/CLI can do for you 6 The rationale behind the new syntax Hello World in C++/CLI 13

Saikat Banerjee Page 1

.NET. Inf 5040, Outline. Gyrd Brændeland, Sharath Babu Musunoori, Åshild Grønstad Solheim

CHAPTER 7 COM and.net

INTERNAL ASSESSMENT TEST 1 ANSWER KEY

C#.Net. Course Contents. Course contents VT BizTalk. No exam, but laborations

1 C# and the.net Framework

Short Notes of CS201

Assemblies. necessary and sufficient to make that file self describing. This unit is called Assembly.

PESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of Computer Science And Engineering

CS201 - Introduction to Programming Glossary By

Uka Tarsadia University MCA ( 3rd Semester)/M.Sc.(CA) (1st Semester) Course : / Visual Programming Question Bank

2609 : Introduction to C# Programming with Microsoft.NET

Very similar to Java C++ C-Based syntax (if, while, ) object base class no pointers, object parameters are references All code in classes

Java J Course Outline

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

M. K. Institute Of Computer Studies, Bharuch SYBCA SEM IV VB.NET (Question Bank)

Course Description. Learn To: : Intro to JAVA SE7 and Programming using JAVA SE7. Course Outline ::

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Dot Net Framework 4.0: Advanced Microsoft C#.NET Web Development

Transcription:

Chettinad College of Engineering & Technology CS2014 C# &.NET Framework Part A Questions Unit I 1. Define Namespace. What are the uses of Namespace? A namespace is designed for providing a way to keep one set of names separate from another. The class names declared in one namespace will not conflict with the same class names declared in another. A namespace definition begins with the keyword namespace followed by the namespace name as follows: namespace namespace_name 2. How will you determine the Operators value? The operator value can be determined based on the operator precedence or priority and also based on associativity of the operators. 3. What is Program Structure in C#? A C# program basically consists of the following parts: Namespace declaration A class Class methods Class attributes A Main method Statements & Expressions Comments 4. What are implicit and explicit conversions? Implicit casting doesn't require a casting operator, usually it takes place when we assign a value of smaller type to variable of larger type. Example assigning an integer value to float or double. int x=10; double d=x; Explicit conversion is the forced one by promoting one type to another which results in loss of data. It requires the types of conversion to be specified. double d=10.0; int a=(int )d; 5. Define Boxing and Unboxing. Give example. Boxing means the conversion of a value type on the stack to a object type on the heap. Conversely, the conversion from an object type back to a value type is known as unboxing. int m = 100;

object om = m; int n = (int) om; 6. What are jagged array? C# also allows you to create a special type of two-dimensional array called a jagged array. A jagged array is an array of array in which the length of each array can differ. Thus a jagged array can be used to create a table in which the lengths of the rows are not the same. 7. List out the different types of Applications that can be created on.net Windows Application, Web service, Console Application, Assembly, User Defined Controls, and Web Application 8. What are the Benefits of using.net?.net supports the application to be created in multiple languages.net enables user to create different category of application using many languages. 9. What is Structure? A struct in C# provides a unique way of packing together data of different types. It is a convenient tool for handling a group of logically related data items. It creates template that may be used to define the data properties. Once the structure type has been defined, we can create variable of that type using declarations that are similar to the built in type declarations. 10. What are the basic elements of C#? Class, Attributes, Events, Properties, indexers, methods, interfaces, delegates, etc. 11. What is CLR and what are the functionality s of the CLR? The Common Language Runtime, popularly known as CLR is the heart and soul of the.net framework. As the name suggests, CLR is a runtime environment in which programs written in C# and other.net languages are executed. It also supports cross-language interoperability. The CLR provides a number of services that include: Loading and execution of programs Memory isolation for applications Verification of type safety Compilation of IL into native executable code Providing metadata 12. What is meant by JIT? JIT is the part of.net framework included in the CLR which does the conversion of MSIL code to native code or machine code translation on demand at runtime. The converted code is executed by the CLR. 13. C# supports multiple main methods. Justify you answer.

C# includes a feature that enables us to define more than one class with the Main method. Since Main is the entry point for program execution, there are now more than one entry point which result in compilation error. This problem can be resolved by specifying which is to be used to the compiler at the time of compilation as shown below: csc filename.cs/main:classname 14. What are the difference between the value type and the reference type? Value types Value types (which are of fixed length) are stored on the stack, and when a value of a variable in assigned to another variable, the value is actually copied. This means that two identical copies of the value are available in memory. Reference types Reference types (which are of variable length) are stored on the heap, and when an assignment between two reference variable occurs, only the reference is copied; the actual value remains in the same memory location. This means that there are two references to a single value. 15. What are the advantage of foreach statement over the for loop statement? The advantage of foreach over the for statement is that it automatically detects the boundaries of the collection being iterated over. 16. Define inter operability. How does.net achieve this? Dot.net achieve interoperability with the help of Common Type System (CTS), every language that run in the.net platform has to obey the minimum set of rules. Each language can interact with each other using the CTS and CLS. Unit II 17. Differentiate Constant and read-only. Both the types are meant to declare the variable with constant value, but the read-only type can have different value for every execution since the value gets assigned during the run-time 18. How does an ArrayList differ from Array? S.No Array ArrayList Arrays are strongly typed arrays. It stores Array List is not strongly type. It stores a collection 1 a collection of values from same data type of values from different data types or same data type Arrays are of specified length that cannot Array List resizes dynamically it can take any size of 2 be change during runtime. values 19. How to create a one dimensional indexer? public class Demo String[] name=new String[5];

public string this[int index] get If(index >=0 && index< 5) return name[index]; else return Invalid index ; set name[index]=value; 20. What are the uses of indexers? Array indexing is performed using the []operator. An indexer allows an object to be indexed like an array. The main use of indexes is to support the creation of specified arrays that are subjects to one or more constraints. 21. Give an example for virtual method and polymorphism? class poly public virtual void add(int a,int b) class Test:poly public override void add(int a,int b) Console.WriteLine(a+b); public static void Main() Test ob=new Test(); ob.add(10,20); 22. What are sealed Keywords? The sealed keyword prevents the class being inherited, also restricts the method from overriding. 23. What is polymorphism? Polymorphism, in C#, is the ability of objects of to take multiple forms with representing same name. C# supports operation and Inclusion polymorphism. 24. Define Exception Errors are the programmer s mistakes which can be identified during the compilation process itself, but the Exception is a condition that is caused by a run-time error in the program, which leads system crash or halting the program.

25. What is the use of static constructor in C#? A static constructor is called before any object of the class is created. This is usually used to assign initial values to static data members. 26. What is the use new in inheritance? We can use the modifier new to tell the compiler that the derived class method hides the base class method 27. Is Delegate a type safe function pointer? Justify it. Delegate is a type safe function pointer. Since the signature of the delegate must exactly match with the signature of the method that has to be invoked. 28. What is the use of is operator in interface? Write one example. The Is operator in C# is used to check if a type of an object is compatible with the other type. If type is not compatible, you will also see C# compiler will through an error. Unit III 29. Define Multi-tasking and Multi-Threading with an example? Multitasking is the ability of an operating system to execute more than one program simultaneously. Multithreading is the ability of an operating system to execute the different parts of the program, called threads, simultaneously. class Demo protected void wait() Response.Write("Call Child Thread"); public static void Main() ThreadStart ch1 = new ThreadStart(wait); Thread th = new Thread(ch1); th.start; // child thread start.. 30. Define Synchronization. Give an Example. Synchronization is needed in thread when we have multiple threads that share data, we need to provide synchronized access to the data. C# supports four mechanism to implement synchronization are: Lock, Mutex, Semaphore, and Monitor. 31. What is Multitasking? What are advantages of Multitasking? Advantages: Concurrent execution of multiple task Responsiveness

Resource sharing 32. What is file operation? File operations refers to the task carried out on the file or over its contents namely renaming, reposition, deleting, truncating, Appending, copying, moving, etc. 33. What is Thread? A thread is a path of execution within a program that can be executed separately. In.NET framework threads run in application domains. A thread is also known as lightweight process. Unit IV 34. How will you add the DataGridView controls to the windows form? DataGridView dg=new DataGridView(); dg.size=new Size(300,200); this.controls.add(dg); 35. What are the two fundamental objects in ADO.NET? The two ADO.NET objects are DataReader and DataSet. DataReader is a forward stream-only object which is used to process the results entity. DataSet is used in Connection less model which is used to build the virtual table in the client side. 36. What is data binding? Data Binding is the techniques by which data is "bound" to the Windows Forms controls that display data. Data binding comes in two flavors: simple and complex. Controls that contain one value, such as a label or Textbox, rely on simple binding. Controls populated with rows of data, such as a ListBox, DataGrid, or DataGridView, require complex binding. 37. Explain concept of DataSet? The ADO.NET DataSet contains DataTableCollection and their DataRelationCollection. It represents a complete set of data including the tables that contain, order, and constrain the data, as well as the relationships between the tables. 38. Differentiate Data Reader and Data Adapter? DataReader Object in ADO.NET is a stream-based, forward-only, read-only retrieval of query results from the Data Sources, which do not update the data. The DataReader cannot be created directly from code; they can create only by calling the ExecuteReader method of a Command Object. DataAdapter as a bridge between the DataSet and the data source, which is the underlying database. DataAdapter provides the Fill () method to retrieve data from the database and populate the DataSet.

39. How do you create a XML document in C#? XmlDocument doc=new XmlDocument(); XmlNode root=doc.createelement( Users ); Xmlnode user1=doc.createelement( user ); Xmlnode uid=doc.createelement( UserID ); uid.innertext= XXX ; user1.appendchild(uid); root.appendchild( user ); doc.save( test.xml ); 40. Write the Syntax for DatagridView Class? public class DataGridView : Control, ISupportInitialize Unit V 41. Define SOAP, WSDL and UDDI. SOAP is defined as "a lightweight protocol for exchange of information in a decentralized, distributed environment." Web Services Description Language (WSDL) document that provides the name of the service, the signature of the method(s) that can be called, the address of the service (usually a URL), and binding information that describes how the transport operation will occur. Using WSDL document the client make the request to invoke the service from server. UDDI is universally defined web service registry directory which is to publish the service by server and the client made search to find the service facility. 42. List out the types of Client side validation controls supported in ASP.NET. Required Field Validator Range validator Compare validator Regular Expression validator Custom Validator 43. What is Application Domain in.net It is a logical and physical unit of isolation built around every.net application by the Common Language Runtime (CLR) and contains its own set of code, data and configuration settings. Application

Domain is mainly to isolate applications form one another so that applications do not access or affect each other. Its Advantages are: Code Isolation Security Performance increment 44. Define Attributes? Attributes are descriptive tags that can be used to provide additional information about types (classes), members, and properties. Attributes can be used by.net to decide how to handle objects while an application is running. There are two types of attributes: Attributes that are defined in the CLR. Custom attributes that you can define in your code. 45. What is obsolete Attribute? The Obsolete attribute is used to mark any types or members that shouldn t be used. When a type or member is marked with the Obsolete attribute, using it generates a warning at compile time. 46. Create the CheckedListBox in C# and add Items to it? CheckedListBox C1=new CheckedListBox(); C1.Items.Add( It ; C1.Item.Add( CSE ); C1.Item.Add( ECE ); String[] dept=new String EEE, MECH, CIVIL ; C1.Items.AddRange(dept); 47. What is Evidence? Evidence refers to information about an assembly which is collected by CLR in-order to provide rights to access certain code or assembly. The evidence comprises of Strong Name, publisher, Zone, Hash, URL, Site and Application Directory. Using those information the CLR classify the right to access or not. 48. List out the Server side & Client side state Management techniques? Server side: Session and Application Client Side: View State, Query String and Cookies. 49. What is Marshaling? Marshalling is a process of making an object available across network or application domain or process of creating bridge between managed and unmanaged code. Marshalling is of two types:

When a client gets an actual copy of the object, it is referred to as marshaling by value. When the client gets only a reference to the remote object, it is referred to as marshaling by reference. 50. Define Assemblies. Assemblies are the packaged unit that contains programs and libraries. It contains Self describing binary which can be either Dynamic Link Libraries (DLL) or Executables (EXE).It also contains collection of types such as classes, interfaces, structures, and so on. Assembly contains the following four elements: Manifest Metadata MSIL Code Set of Resources 51. What are the difference between Single Call and Single ton? S.No Single Call Singleton 1 Stateless Objects, they didn t hold and state between calls. 2 They live only for the duration of servicing a call, after that they are destroyed. State-full objects, hold state between the calls. Only one object serves all the clients making call on them. 52. What is Dell Hell Problem? How it can be rectified? Dell Hell problem occurs when an assembly being installed for a newer application tends to overwrite components of an old application, causing the old application to exhibit strange behavior or stop malfunctioning..net Framework resolves the problem by isolating the components by using the Version number of the component 53. What is Remoting? Remoting is as a way to permit applications in separate AppDomains to communicate and exchange data..net remoting provides an abstract approach to inter process communication that separates the remotable object from a specific client or server application domain and from a specific mechanism of communication. Remoting can be implemented in two ways: When a client gets an actual copy of the object, it is referred to as marshaling by value ( MBV ) ; When the client gets only a reference to the remote object, it is referred to as marshaling by reference (MBR).