The document provides definitions and explanations of various C# concepts including polymorphism, abstract methods, virtual methods, objects, classes, static methods, inheritance, virtual keyword, abstract classes, sealed modifiers, interfaces, pure virtual functions, access modifiers, reference types, overloading, overriding, encapsulation, arrays, array lists, hash tables, queues, stacks, early binding, late binding, sorted lists, and delegates. Key points covered include the differences between abstract and virtual methods, what defines a class versus an object, when to use static versus non-static methods, inheritance implementation in C#, and the purpose of interfaces.
This document provides a summary of questions for a C# interview. It includes general C# questions, class questions, method and property questions, events and delegates questions, XML documentation questions, debugging and testing questions, ADO.NET and database questions, and assembly questions. The author gathered these questions from various sources and their own experience, and is seeking feedback to improve or suggest new questions.
Top 20 c# interview Question and answersw3asp dotnet
This presentation contains interview question and answers . www.w3asp.net provide you the information, knowledge, job, practices and tranings regarding asp.net.
The document contains interview questions and answers related to C# programming concepts like classes, inheritance, polymorphism, interfaces, structs, arrays, collections, exceptions, and more. Some key points:
- C# does not support multiple inheritance but interfaces can be used instead. Private variables are inherited but not accessible.
- The top .NET class is System.Object. String is immutable while StringBuilder allows mutable operations. Arrays store single data types and Clone vs CopyTo were explained.
- Abstract classes define methods that must be overridden, while interfaces only contain method signatures that must be implemented. Structs are value types stored on the stack.
- Virtual methods can be overridden, while override changes
The document contains interview questions and answers about various C# concepts. Some of the key points covered include:
- C# supports single inheritance but not multiple inheritance, instead interfaces should be used.
- Abstract classes cannot be instantiated and must be inherited from, while interfaces contain only abstract method signatures that must be implemented.
- The System.String class is immutable while System.StringBuilder is mutable and more efficient for string manipulation.
- Exceptions should generally not be thrown within application code, and instead the proper error handling code should be written.
- Debugging tools that come with the .NET SDK include CorDBG and DbgCLR, while the Visual Studio debugger uses DbgCLR.
-
This document contains questions and answers related to .NET interview questions asked by Vineet Kumar Saini. It includes questions on SQL queries, ASP.NET controls and properties, OOPs concepts, threading, Ajax and more. The questions range from basic to advanced levels covering key areas of .NET such as C#, VB.NET, ASP.NET and ADO.NET.
The document contains a list of questions and answers related to .NET interview questions. It covers topics such as object-oriented programming concepts in C# like classes, inheritance, polymorphism, exceptions, delegates, generics, collections and more. For each question there is a detailed answer explaining the concept. It serves as a guide for developers to prepare for .NET technical interviews.
This document provides a summary of questions for a C# interview. It includes general C# questions, class questions, method and property questions, events and delegates questions, XML documentation questions, debugging and testing questions, ADO.NET and database questions, and assembly questions. The author gathered these questions from various sources and their own experience, and is seeking feedback to improve or suggest new questions.
Top 20 c# interview Question and answersw3asp dotnet
This presentation contains interview question and answers . www.w3asp.net provide you the information, knowledge, job, practices and tranings regarding asp.net.
The document contains interview questions and answers related to C# programming concepts like classes, inheritance, polymorphism, interfaces, structs, arrays, collections, exceptions, and more. Some key points:
- C# does not support multiple inheritance but interfaces can be used instead. Private variables are inherited but not accessible.
- The top .NET class is System.Object. String is immutable while StringBuilder allows mutable operations. Arrays store single data types and Clone vs CopyTo were explained.
- Abstract classes define methods that must be overridden, while interfaces only contain method signatures that must be implemented. Structs are value types stored on the stack.
- Virtual methods can be overridden, while override changes
The document contains interview questions and answers about various C# concepts. Some of the key points covered include:
- C# supports single inheritance but not multiple inheritance, instead interfaces should be used.
- Abstract classes cannot be instantiated and must be inherited from, while interfaces contain only abstract method signatures that must be implemented.
- The System.String class is immutable while System.StringBuilder is mutable and more efficient for string manipulation.
- Exceptions should generally not be thrown within application code, and instead the proper error handling code should be written.
- Debugging tools that come with the .NET SDK include CorDBG and DbgCLR, while the Visual Studio debugger uses DbgCLR.
-
This document contains questions and answers related to .NET interview questions asked by Vineet Kumar Saini. It includes questions on SQL queries, ASP.NET controls and properties, OOPs concepts, threading, Ajax and more. The questions range from basic to advanced levels covering key areas of .NET such as C#, VB.NET, ASP.NET and ADO.NET.
The document contains a list of questions and answers related to .NET interview questions. It covers topics such as object-oriented programming concepts in C# like classes, inheritance, polymorphism, exceptions, delegates, generics, collections and more. For each question there is a detailed answer explaining the concept. It serves as a guide for developers to prepare for .NET technical interviews.
C++ Object oriented concepts & programmingnirajmandaliya
This document discusses various C++ concepts related to functions and operators. It defines what a default pointer is and how it receives addresses passed to a called function. It also discusses reference variables, inline functions, friend functions, default arguments, passing objects as parameters, function overloading, static members, function pointers, and operator overloading. It provides examples and explanations for each concept.
Interface in java By Dheeraj Kumar Singhdheeraj_cse
In Java,
An interface is a way through which unrelated objects use to interact with one another.
Using interface, you can specify what a class must do, but not how it does it.
It is not a class but a set of requirements for classes that implement the interface.
Get More on http://www.ManzoorTheTrainer.com
This eBook contains 109 important interview questions along with answers that any web developer looking for a job on MS.Net platform needs to know. This eBook starts with two articles one of which talks about why most of the engineers are jobless and the other say the solution for it. As a technical part I have covered the following MS.Net technologies ASP.Net, C#.Net & ADO.Net and MS SQL Server.
Second edition is also on the way with focus on at least one real time example on each question.
Key features: Point to point | Simple language
C++ is an object-oriented programming language that is an incremented version of C with classes added. Some key differences between C and C++ are that C++ uses object-oriented programming with classes that can contain both data and functions, while C focuses more on procedures/functions and allows any function to access data. The document then discusses the basic concepts of object-oriented programming in C++ including classes, objects, polymorphism, inheritance, encapsulation, and data abstraction. It provides examples of classes, objects, reference variables, default arguments, and dynamic memory allocation in C++.
The document discusses the final keyword in Java and provides examples of using final with variables, methods, and classes. It then summarizes abstract classes and interfaces in Java, including how to declare abstract classes and methods and how interfaces are used to achieve abstraction and multiple inheritance. The document also covers packages, access modifiers, encapsulation, and arrays in Java.
This document discusses abstract classes and interfaces in Java. It begins by defining an interface and how to declare methods in an interface. It then discusses how to implement an interface in a class. The document notes that unlike abstract classes, interfaces can only contain abstract methods and constants. It explains that interfaces allow for multiple inheritance in Java while abstract classes do not. The key differences between abstract classes and interfaces are summarized. Finally, it provides some guidelines on class design and recommends next steps for learning additional Java topics after understanding object-oriented programming fundamentals.
oops concept in java | object oriented programming in javaCPD INDIA
The document discusses key concepts in object-oriented programming in Java including classes, objects, inheritance, packages, interfaces, encapsulation, abstraction, and polymorphism. It provides examples to illustrate each concept. Classes define the structure and behavior of objects. Objects are instances of classes. Inheritance allows classes to extend existing classes. Packages organize related classes. Interfaces define behaviors without implementation. Encapsulation hides implementation details. Abstraction models essential features without specifics. Polymorphism allows the same method name with different signatures or overriding.
OCA Java SE 8 Exam Chapter 1 Java Building Blocksİbrahim Kürce
The document discusses key concepts in Java including classes, objects, fields, methods, variables, primitive types, reference types, and memory management. It explains that classes are the basic building blocks in Java programs and contain fields and methods. Objects are instances of classes that exist in memory. The document also covers variable scope, default initialization, and garbage collection in Java.
The document discusses interfaces in Java. It defines an interface as a syntactically similar to a class but lacking instance variables and having methods declared without bodies. Interfaces are defined using the interface keyword. A class implements an interface by providing implementations for all the interface's methods. Variables can be declared with an interface type and refer to any class that implements the interface, allowing polymorphic calls through interfaces.
This document provides an overview of object-oriented programming concepts. It discusses the need for OOP, defining classes and objects, class hierarchies and inheritance, method binding and overriding, exceptions, and abstraction mechanisms. The key concepts covered are objects, classes, encapsulation, inheritance, polymorphism, and abstraction.
Abstract classes allow for incomplete implementations and common functionality to be shared among subclasses, interfaces define a contract for methods without implementations, and both are useful for abstraction and polymorphism by defining types independently of their concrete implementations.
Java OOP Programming language (Part 6) - Abstract Class & InterfaceOUM SAOKOSAL
Java OOP Programming language (Part 6) - Abstract Class & Interface
Oum Saokosal
Where to me find me more:
YouTube: https://www.youtube.com/user/oumsaokosal
FB Page: https://facebook.com/kosalgeek
PPT: https://www.slideshare.net/oumsaokosal
Twitter: https://twitter.com/okosal
Web: http://kosalgeek.com
This document provides an overview of object-oriented programming concepts in Java including inheritance, polymorphism, abstraction, and encapsulation. It also discusses control structures like if/else statements and switches as well as repetition structures like while, do-while, and for loops. Arithmetic operations in Java like addition, subtraction, multiplication, and division are also mentioned.
Interfaces define methods that classes can implement. Classes implementing interfaces must define all interface methods. Interfaces can extend other interfaces, requiring implementing classes to define inherited methods as well. Interface variables are implicitly public, static, and final. A class can implement multiple interfaces and override methods with the same name across interfaces. Partial interface implementation requires the class to be abstract.
The document provides definitions and explanations of various object-oriented programming concepts in Delphi such as classes, objects, visibility of class members, inheritance, abstract classes, interfaces, constructors, virtual functions, polymorphism, late binding, encapsulation, properties, exceptions handling, and runtime type information (RTTI). It discusses these concepts through questions and answers. Key points covered include the relationship between classes and objects, differences between visibility levels of class members, how inheritance allows the creation of subclasses, rules around abstract classes and methods, limitations of interfaces, how to define and overload constructors and functions, use of virtual functions and polymorphism, and how RTTI is used.
This is a presentation I did for the Cedar Rapids .NET User Group (CRineta.org). It was intended to present object oriented concepts and their application in .NET and C#.
This document provides a summary of key Java concepts and answers to common Java interview questions. It begins with an introduction explaining what the presentation covers. The bulk of the document consists of questions and detailed answers on topics like exceptions, abstract classes, strings, arrays, collections, inheritance and polymorphism.
This document provides an overview of object-oriented programming (OOP) concepts including classes, visibility, encapsulation, inheritance, polymorphism, and abstraction. A class defines the structure and behavior of an object and includes both data and functions. Visibility determines which members can be accessed from within or outside the class. Encapsulation wraps data and functions into a single unit. Inheritance allows a subclass to inherit properties and behaviors from a parent class. Polymorphism enables classes to provide different implementations of methods with the same name. Abstraction hides implementation details and provides essential public methods to manipulate object data without knowing internal details.
Visual Basic is an object-oriented programming language that supports object-oriented programming features like abstraction, encapsulation, polymorphism, and inheritance. It emphasizes objects and classes, with a program divided into objects that communicate through functions. Objects are instances of classes that contain data members and methods. Classes group similar objects and methods become class functions.
C# is similar to C++ but easier to use, as it does not support pointers, multiple inheritance, header files or global variables. Everything must live within a class or struct. The basic syntax will be familiar to C++ programmers. Key features include properties, interfaces, foreach loops, and delegates for event handling. Properties allow custom getter and setter logic and are preferred over public fields. Delegates provide a type-safe way to link methods, and events build on this to prevent issues with multicast delegates. Generics and assemblies are analogous to C++ templates and deployment units.
The document contains 29 questions and answers related to ASP.net and C# programming. It discusses topics like the differences between ASP and ASP.NET, how to identify a postback, accessing user locale information, signing out of forms authentication, and registering custom server controls. The document is an interview preparation guide that covers common ASP.net and C# concepts and techniques.
C++ Object oriented concepts & programmingnirajmandaliya
This document discusses various C++ concepts related to functions and operators. It defines what a default pointer is and how it receives addresses passed to a called function. It also discusses reference variables, inline functions, friend functions, default arguments, passing objects as parameters, function overloading, static members, function pointers, and operator overloading. It provides examples and explanations for each concept.
Interface in java By Dheeraj Kumar Singhdheeraj_cse
In Java,
An interface is a way through which unrelated objects use to interact with one another.
Using interface, you can specify what a class must do, but not how it does it.
It is not a class but a set of requirements for classes that implement the interface.
Get More on http://www.ManzoorTheTrainer.com
This eBook contains 109 important interview questions along with answers that any web developer looking for a job on MS.Net platform needs to know. This eBook starts with two articles one of which talks about why most of the engineers are jobless and the other say the solution for it. As a technical part I have covered the following MS.Net technologies ASP.Net, C#.Net & ADO.Net and MS SQL Server.
Second edition is also on the way with focus on at least one real time example on each question.
Key features: Point to point | Simple language
C++ is an object-oriented programming language that is an incremented version of C with classes added. Some key differences between C and C++ are that C++ uses object-oriented programming with classes that can contain both data and functions, while C focuses more on procedures/functions and allows any function to access data. The document then discusses the basic concepts of object-oriented programming in C++ including classes, objects, polymorphism, inheritance, encapsulation, and data abstraction. It provides examples of classes, objects, reference variables, default arguments, and dynamic memory allocation in C++.
The document discusses the final keyword in Java and provides examples of using final with variables, methods, and classes. It then summarizes abstract classes and interfaces in Java, including how to declare abstract classes and methods and how interfaces are used to achieve abstraction and multiple inheritance. The document also covers packages, access modifiers, encapsulation, and arrays in Java.
This document discusses abstract classes and interfaces in Java. It begins by defining an interface and how to declare methods in an interface. It then discusses how to implement an interface in a class. The document notes that unlike abstract classes, interfaces can only contain abstract methods and constants. It explains that interfaces allow for multiple inheritance in Java while abstract classes do not. The key differences between abstract classes and interfaces are summarized. Finally, it provides some guidelines on class design and recommends next steps for learning additional Java topics after understanding object-oriented programming fundamentals.
oops concept in java | object oriented programming in javaCPD INDIA
The document discusses key concepts in object-oriented programming in Java including classes, objects, inheritance, packages, interfaces, encapsulation, abstraction, and polymorphism. It provides examples to illustrate each concept. Classes define the structure and behavior of objects. Objects are instances of classes. Inheritance allows classes to extend existing classes. Packages organize related classes. Interfaces define behaviors without implementation. Encapsulation hides implementation details. Abstraction models essential features without specifics. Polymorphism allows the same method name with different signatures or overriding.
OCA Java SE 8 Exam Chapter 1 Java Building Blocksİbrahim Kürce
The document discusses key concepts in Java including classes, objects, fields, methods, variables, primitive types, reference types, and memory management. It explains that classes are the basic building blocks in Java programs and contain fields and methods. Objects are instances of classes that exist in memory. The document also covers variable scope, default initialization, and garbage collection in Java.
The document discusses interfaces in Java. It defines an interface as a syntactically similar to a class but lacking instance variables and having methods declared without bodies. Interfaces are defined using the interface keyword. A class implements an interface by providing implementations for all the interface's methods. Variables can be declared with an interface type and refer to any class that implements the interface, allowing polymorphic calls through interfaces.
This document provides an overview of object-oriented programming concepts. It discusses the need for OOP, defining classes and objects, class hierarchies and inheritance, method binding and overriding, exceptions, and abstraction mechanisms. The key concepts covered are objects, classes, encapsulation, inheritance, polymorphism, and abstraction.
Abstract classes allow for incomplete implementations and common functionality to be shared among subclasses, interfaces define a contract for methods without implementations, and both are useful for abstraction and polymorphism by defining types independently of their concrete implementations.
Java OOP Programming language (Part 6) - Abstract Class & InterfaceOUM SAOKOSAL
Java OOP Programming language (Part 6) - Abstract Class & Interface
Oum Saokosal
Where to me find me more:
YouTube: https://www.youtube.com/user/oumsaokosal
FB Page: https://facebook.com/kosalgeek
PPT: https://www.slideshare.net/oumsaokosal
Twitter: https://twitter.com/okosal
Web: http://kosalgeek.com
This document provides an overview of object-oriented programming concepts in Java including inheritance, polymorphism, abstraction, and encapsulation. It also discusses control structures like if/else statements and switches as well as repetition structures like while, do-while, and for loops. Arithmetic operations in Java like addition, subtraction, multiplication, and division are also mentioned.
Interfaces define methods that classes can implement. Classes implementing interfaces must define all interface methods. Interfaces can extend other interfaces, requiring implementing classes to define inherited methods as well. Interface variables are implicitly public, static, and final. A class can implement multiple interfaces and override methods with the same name across interfaces. Partial interface implementation requires the class to be abstract.
The document provides definitions and explanations of various object-oriented programming concepts in Delphi such as classes, objects, visibility of class members, inheritance, abstract classes, interfaces, constructors, virtual functions, polymorphism, late binding, encapsulation, properties, exceptions handling, and runtime type information (RTTI). It discusses these concepts through questions and answers. Key points covered include the relationship between classes and objects, differences between visibility levels of class members, how inheritance allows the creation of subclasses, rules around abstract classes and methods, limitations of interfaces, how to define and overload constructors and functions, use of virtual functions and polymorphism, and how RTTI is used.
This is a presentation I did for the Cedar Rapids .NET User Group (CRineta.org). It was intended to present object oriented concepts and their application in .NET and C#.
This document provides a summary of key Java concepts and answers to common Java interview questions. It begins with an introduction explaining what the presentation covers. The bulk of the document consists of questions and detailed answers on topics like exceptions, abstract classes, strings, arrays, collections, inheritance and polymorphism.
This document provides an overview of object-oriented programming (OOP) concepts including classes, visibility, encapsulation, inheritance, polymorphism, and abstraction. A class defines the structure and behavior of an object and includes both data and functions. Visibility determines which members can be accessed from within or outside the class. Encapsulation wraps data and functions into a single unit. Inheritance allows a subclass to inherit properties and behaviors from a parent class. Polymorphism enables classes to provide different implementations of methods with the same name. Abstraction hides implementation details and provides essential public methods to manipulate object data without knowing internal details.
Visual Basic is an object-oriented programming language that supports object-oriented programming features like abstraction, encapsulation, polymorphism, and inheritance. It emphasizes objects and classes, with a program divided into objects that communicate through functions. Objects are instances of classes that contain data members and methods. Classes group similar objects and methods become class functions.
C# is similar to C++ but easier to use, as it does not support pointers, multiple inheritance, header files or global variables. Everything must live within a class or struct. The basic syntax will be familiar to C++ programmers. Key features include properties, interfaces, foreach loops, and delegates for event handling. Properties allow custom getter and setter logic and are preferred over public fields. Delegates provide a type-safe way to link methods, and events build on this to prevent issues with multicast delegates. Generics and assemblies are analogous to C++ templates and deployment units.
The document contains 29 questions and answers related to ASP.net and C# programming. It discusses topics like the differences between ASP and ASP.NET, how to identify a postback, accessing user locale information, signing out of forms authentication, and registering custom server controls. The document is an interview preparation guide that covers common ASP.net and C# concepts and techniques.
The document provides information about differences between C# and C++ programming languages. It discusses key differences in areas such as pointers, references, classes and structs, accessing native code, destruction handling, operator overloading, preprocessor directives, and exceptions. It also covers C# features like delegates, events, attributes, properties, and configuration management using XML files. The document is intended to help C++ programmers transition to C# development.
Abstraction in Java allows hiding unnecessary details through interfaces and abstract classes. Abstract classes can contain abstract and non-abstract methods but cannot be instantiated, and derived classes must override abstract methods. For example, a SHAPE abstract class could define a calculateArea() abstract method for subclasses like Rectangle, Circle, and Triangle to implement differently.
Abstraction is a process by which concepts are derived from the usage and classification of literal ("real" or "concrete") concepts.
Abstraction is a concept that acts as a super-categorical noun for all subordinate concepts, and connects any related concepts as a group, field, or category.
This document provides an introduction and overview of the C# programming language. It discusses prerequisites, learning objectives, and the agenda. It covers Hello World examples, design goals of C#, types including value types and reference types, program structure, statements, operators, and using Visual Studio and the .NET framework. Key topics are the unified type system in C#, value types vs reference types, boxing and unboxing, predefined types like integers and strings, and object being the root type.
Java Programming - Abstract Class and InterfaceOum Saokosal
This document provides an overview of abstract classes and interfaces in Java. It defines what an interface is, how to define and use interfaces, and why interfaces are used instead of abstract classes. Key points include:
Interfaces are similar to abstract classes but can only contain abstract methods and constants. Classes implement interfaces to inherit their methods. Abstract classes can contain both abstract and non-abstract methods.
Interfaces are used instead of abstract classes to allow for multiple inheritance in Java, since a class can only extend one parent class but implement multiple interfaces. Interfaces define weak "is-a" relationships while abstract classes define strong "is-a" relationships.
The UML notation for interfaces uses <<interface>> to differentiate them
This document provides an overview of classes and objects in C#, covering key concepts like constructors, inheritance, access modifiers, abstract classes, static classes, sealed classes, and partial classes. It compares classes to objects, discusses how constructors are used to create objects, and explains features like encapsulation, inheritance, and polymorphism that C# supports for object-oriented programming. The summary reiterates that C# provides everything needed for OOP and additionally discusses static classes, sealed classes, and partial classes.
The document discusses key concepts in C++ classes including encapsulation, information hiding, access specifiers, and constructors. It defines a class as a way to combine attributes and behaviors of real-world objects into a single unit. A class uses encapsulation to associate code and data, and information hiding to secure data from direct access. Access specifiers like public, private, and protected determine member visibility. Constructors are special member functions that initialize objects upon instantiation.
C is an older procedural language that does not support object-oriented programming. C++ adds object-oriented features to C but remains a lower-level language. C# is a higher-level, fully object-oriented language that is easier to use for web and client application development compared to C/C++ due to features like garbage collection and a robust standard library. While C/C++ give more control, their complexity and lack of memory management can make them more difficult for development compared to the managed memory and well-defined behavior of C#.
Java vs. C#
The document compares Java and C# programming languages. It discusses some key differences:
1. Syntax differences such as main method signatures, print statements, and array declarations are slightly different between the two languages.
2. Some concepts are modified in C# from Java, such as polymorphism requiring the virtual keyword, operator overloading restrictions, and switch statements allowing string cases.
3. C# introduces new concepts not in Java like enumerations, foreach loops, properties to encapsulate fields, pointers in unsafe contexts, and passing arguments by reference.
The document provides an overview of the C# programming language. It discusses that C# is an object-oriented language developed by Microsoft for building applications on the .NET platform. Some key points covered include:
- C# is derived from C/C++ but simplifies aspects of these languages. It supports features like automatic memory management, events, delegates, and object-oriented programming principles.
- The .NET Framework provides the runtime environment for C# and other .NET languages. It includes the Common Language Runtime (CLR) for memory management, security, and other services.
- C# code is compiled to an intermediate language (IL) that is executed by the CLR on any .NET-compatible platform.
This resume is unconventionally formatted and lacks typical sections. It introduces the author, Saranyan, who currently works at Qualcomm designing chips after obtaining a PhD. They have published 15 works and have strong initiative, teamwork, and problem-solving skills. Saranyan has proficiency in many programming languages including Verilog-AMS, Verilog, C, C++, Perl, Java, C#, and Actionscript. They have experience managing people and projects.
This document discusses abstract classes and interfaces in C# programming. Abstract classes cannot be instantiated and can only be sub-classed, while interfaces contain only abstract members and cannot be instantiated. Both abstract classes and interfaces specify behaviors that subclasses/implementers must define, but abstract classes can also contain partial implementations, while interfaces only specify contracts and provide no implementation. The key differences are that interfaces are for specifying what an object can do, while abstract classes specify what an object is and can provide some implementation.
This document discusses various features of the C# programming language across different versions. It provides an overview of key C# concepts like object oriented programming, managed code, and garbage collection. It also summarizes major features introduced in each version of C# such as generics in C# 2.0, implicit typing in C# 3.0, and asynchronous methods in C# 5.0. The document explains concepts like inheritance, polymorphism, and the differences between abstract classes and interfaces.
The document discusses object-oriented programming concepts including encapsulation, composition, inheritance, polymorphism, abstract classes, and interfaces. It provides examples of how these concepts are implemented in C# through classes, inheritance between base and derived classes, abstract methods, and interfaces. It also summarizes key features like polymorphism which allows treating a derived class object as its base class.
This document provides an overview of common object-oriented programming (OOP) concepts and interview questions. It discusses key OOP concepts like classes, objects, encapsulation, inheritance, polymorphism, and abstraction. It also explains common OOP-related interview questions on topics such as constructors, destructors, access modifiers, exception handling, and differences between abstract classes and interfaces. The document aims to help prepare for OOP-focused technical interviews.
The document discusses various topics related to C programming language and C++. It begins by providing definitions for C language and describing its origins and widespread usage. It then lists different types of constants and instructions in C. Next, it defines pointers and compares arrays and pointers. The document also compares C and C++ and discusses differences between their features like inheritance, function overloading, and variable declaration. Finally, it covers additional C++ topics such as classes, structures, storage qualifiers, and virtual/friend classes.
Object-oriented programming (OOP) involves splitting a program into objects that contain both data and functions. OOP allows developers to define objects, their properties, and relationships. Classes are blueprints that define objects and don't use memory, while objects are instances of classes that hold both data and methods. Key concepts of OOP include inheritance, abstraction, polymorphism, and encapsulation.
This document discusses key object-oriented programming concepts like abstraction, encapsulation, polymorphism, and inheritance in C#. It provides examples of defining classes and interfaces, implementing interfaces, inheriting from base classes, and accessing members of base classes from derived classes. Key points covered include defining public and private members, calling base class constructors from derived classes, and overriding and accessing virtual methods.
Inheritance allows a class to inherit properties from another class. Subclasses inherit attributes and methods from the base/parent class without redefining them. Subclasses can add their own unique attributes as well. Abstract classes provide a common definition for subclasses to share but cannot be instantiated directly. Interfaces define a contract that subclasses must implement but provide no implementation. Polymorphism allows classes to take different forms through method overloading and overriding.
A constructor is used to create objects and has the same name as the class with no return type. A method is an ordinary member function that can have its own name and return type.
The purpose of garbage collection is to identify and discard objects no longer needed by a program to reclaim memory. An object becomes eligible for garbage collection when it is unreachable.
Synchronization controls access to shared resources for multithreading by preventing one thread from modifying a variable while another thread is using it, which can cause errors.
An abstract class cannot be instantiated and is meant to serve as a template for subclasses to extend, while an interface can only declare constants and abstract methods but provides no implementation.
Object-oriented programming organizes programs around objects and interfaces rather than functions and logic. Key concepts include classes, objects, encapsulation, inheritance, and polymorphism. Procedural programs follow procedures to execute instructions sequentially, while OOP programs use objects that combine data and code. Procedural programs expose data while OOP programs keep data private within objects.
The document discusses application packages and classes in PeopleSoft. It defines what an application package and class are, and explains how to create them using Application Designer. It also covers object-oriented concepts like classes, objects, encapsulation, inheritance, polymorphism. Additionally, it discusses class structure, importing packages and classes, access controls, defining methods, abstract methods, interfaces, constructors, get/set methods, and exception handling.
The document contains questions and answers related to Java interview questions. It discusses topics like access modifiers, differences between abstract classes and interfaces, garbage collection, constructors vs methods, inheritance, polymorphism, exceptions and more. The questions aim to test the interviewee's understanding of core Java concepts.
The document discusses key concepts in Java including abstraction, encapsulation, inheritance, polymorphism, interfaces, abstract classes, collections, threads, and exceptions. It defines each concept and provides examples. Abstraction hides unnecessary details, encapsulation wraps data within a class, inheritance allows subclasses to inherit features of the parent class, and polymorphism allows one name to refer to different implementations. Interfaces are used for non-related classes to implement common behaviors, while abstract classes provide partial implementations for subclasses to complete. Collections organize objects into groups, and threads allow concurrent execution of tasks. Exceptions handle runtime errors.
This document provides an overview of key object-oriented programming concepts in Java including classes, objects, encapsulation, inheritance, polymorphism, abstraction, interfaces, exception handling, and static methods. It includes examples of defining classes with properties and methods, creating objects, and using inheritance. Specific concepts like method overloading, overriding, and exception handling are demonstrated through code examples. The document also discusses data types, control statements, and static methods in Java.
This document discusses key concepts in Java including abstraction, encapsulation, inheritance, polymorphism, and interfaces. It defines these concepts and provides examples. Abstraction hides unnecessary details and shows essential information. Encapsulation wraps data and functions into a single unit. Inheritance allows a subclass to acquire properties of another class. Polymorphism supports method overloading and overriding. Interfaces can be used to implement inheritance between unrelated classes and specify what a class must do without defining how. The document also discusses access specifiers, modifiers, variables, literals, and static and final keywords.
EEE oops Vth semester viva questions with answerJeba Moses
1. An object is the basic unit of object-oriented programming and represents an instance of a class. Objects have unique names and can hold their own data.
2. A class defines a collection of similar objects. Instances are objects created from classes through a process called instantiation.
3. Object-oriented programming organizes programs around objects and a set of well-defined interfaces to access object data. Data is encapsulated within classes and accessed through member functions.
In procedural programs, logic follows procedures and instructions execute sequentially, while in object-oriented programs (OOP), the unit is the object which combines data and code. OOP programs encapsulate data within objects and assure security, while procedural programs expose data. Encapsulation binds code and data, inheritance allows acquiring properties of another object, and polymorphism allows a general interface for class actions. Initialization can only occur once while assignment can occur multiple times. OOP organizes programs around objects and well-defined interfaces to data, with objects controlling access to code.
This document provides an overview of object-oriented programming concepts in Java, including naming conventions, data types, variables, data hiding, abstraction, encapsulation, inheritance relationships, method signatures, polymorphism, constructors, and wrapper classes. It defines each concept and provides examples. For instance, it explains that naming conventions establish readability rules for identifiers, abstraction hides unnecessary details while exposing essential features, encapsulation allows objects to contain related properties and methods, and inheritance allows objects to acquire properties of other objects.
The document provides an overview of classes and inheritance in C#. It defines what a class is and how to define a class with members like variables, methods, constructors and destructors. It discusses encapsulation, static members, inheritance between a base and derived class, and how to initialize the base class. While C# does not support multiple inheritance with classes, it can be implemented with interfaces. Examples are provided to demonstrate defining classes and inheritance.
C++ provides classes as templates to define common data structures and algorithms. Classes like vector and list define containers that store and retrieve objects through iterators. Iterators allow traversing container elements without knowing details of the underlying data structure. The Standard Template Library contains many useful container and algorithm classes that take advantage of templates and iterators to provide powerful and flexible generic programming capabilities in C++.
The document discusses key aspects of the Java class library including documentation, interfaces, implementations, access modifiers, and common classes. It provides examples of using library classes like Random and maps. It emphasizes the importance of understanding library documentation and being able to use classes from documentation without seeing implementations.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
CAKE: Sharing Slices of Confidential Data on BlockchainClaudio Di Ciccio
Presented at the CAiSE 2024 Forum, Intelligent Information Systems, June 6th, Limassol, Cyprus.
Synopsis: Cooperative information systems typically involve various entities in a collaborative process within a distributed environment. Blockchain technology offers a mechanism for automating such processes, even when only partial trust exists among participants. The data stored on the blockchain is replicated across all nodes in the network, ensuring accessibility to all participants. While this aspect facilitates traceability, integrity, and persistence, it poses challenges for adopting public blockchains in enterprise settings due to confidentiality issues. In this paper, we present a software tool named Control Access via Key Encryption (CAKE), designed to ensure data confidentiality in scenarios involving public blockchains. After outlining its core components and functionalities, we showcase the application of CAKE in the context of a real-world cyber-security project within the logistics domain.
Paper: https://doi.org/10.1007/978-3-031-61000-4_16
2. Polymorphism
Polymorphism means one interface and many forms.
Polymorphism is a characteristics of being able to assign a
different meaning or usage to something in different
contexts specifically to allow an entity such as a variable, a
function or an object to have more than one form.
There are two types of polymorphism
Compile Time – function or operator overloading
Runtime – inheritance or virtual functions. EXAMPLE - Overriding
3. Abstract method
It doesn’t provide the implementation
and forces the derived class to override
the method.
4. Virtual Method
It has implementation and provide the
derived class with the option to override it.
5. Object
Object is anything that is identifiable as single
material item.
Object is an instance of a class, it contains real
values instead of variables. For example, lets
create an instance of class Emp called “Siva”.
Emp Siva = New Emp();
Now we can access all methods in the class “Emp” via object “Siva” as shown below.
Siva.setName(“Hi”);
6. Class
It is the generic definition of what an object is a template.
They keyword class in c# indicates that we are going to
define a new class (type of object)
class is the generic definition of what an object is.
A Class describes all the attributes of object, as well as the
methods that implements the behavior of member object.
That means, class is a template of an object. Easy way to
understand a class is to look at an example .
7. Static method
It is possible to declare a method as static
provided that they don’t attempt to
access any instance data or other
instance methods.
8. Inheritance
It provides a convenient way to reuse
existing fully tested code in different
context thereby saving lot of coding.
Inheritance of classes in C# is always
implementation Inheritance.
9. Virtual Keyword
This keyword indicates
that a member can be
overridden in a child class.
It can be applied to
methods, properties,
indexes and events.
10. Abstract class
Abstract class is a class that can not be instantiated, it exists extensively
for inheritance and it must be inherited. There are scenarios in which it is
useful to define classes that is not intended to instantiate; because such
classes normally are used as base-classes in inheritance hierarchies, we
call such classes abstract classes.
Abstract classes cannot be used to instantiate objects; because
abstract classes are incomplete, it may contain only definition of the
properties or methods and derived classes that inherit this implements it's
properties or methods.
Static, Value Types & interface doesn't support abstract modifiers. Static
members cannot be abstract. Classes with abstract member must also
be abstract.
11. Sealed Modifiers
Sealed types cannot be inherited and are
concrete. Sealed modifiers can also be applied to
instance methods, properties, events and indexes.
It can’t be applied to static members
Sealed members are allowed in sealed and non
sealed classes.
If a class is defined as Sealed it cannot be
inherited in derived class. See the above example.
12. Interface
An interface is a contract & defines the
requisite behavior of generalization of types.
An interface mandates a set of behavior, but
not the implementation. Interface must be
inherited. We can't create an instance of an
interface.
An interface is an array of related function that
must be implemented in derived type.
Members of an interface are implicitly public &
abstract.
An interface can inherit from another interface.
13. Pure Virtual Function
It is a function that must be overridden in
derived class and need not be defined. A
virtual function is declared to be “pure”
using the curious “=0”. Syntax:
Class Base {
Public:
void f1() // not virtual
Virtual void f2(); // virtual but not pure
Virtual void f3() = 0; // pure virtual function
};
14. Access Modifiers in C#?
There are five access modifier
Public
Private
Protected
Internal
Protected internal
15. Public Access Modifier
When a method or attribute is defined as
Public, it can be accessed from any code in
project.
The public is a keyword and type members ie.
We can declare a class or its members
(methods) as public. There are no restrictions
on accessing public members.
16. Private Access Modifier
When a method or attribute is defines as private, it can be
accessed by any code within the containing type only.
We can’t explicitly declare a class as private, however if do
not specify any access modifier to the class, its scope will
be assumed as private. Private access is the least
permissive access level of all access modifiers
Private members are accessible only with in the body of the
class or the struct in which they are declared. This is the
default access modifier for the class declaration.
17. Protected Access Modifier
When an attribute and methods are defined
as protected, it can be accessed by any
method in inherited classes & any method
within the same class. The protected access
modifier can’t be applied to class and
interfaces. Methods and fields in a interface
can’t be declared protected.
18. Internal Access Modifier
If an attribute or method is defined as
Internal , Access is restricted to classes
within the current project assembly.
19. Protected Internal Access
Modifier
If an attribute or method is defined as
Protected Internal , Access is restricted to
classes within the current project
assembly and types derived from the
containing class.
20. References types in C#
Here emp2 has an object instance of
Employee Class . But emp1 object is set as
emp2. What this means is that object emp2 is
refereed in emp1 and not that emp2 is
copied into emp1. When a change is made in
emp2 object, corresponding changes can be
seen in emp1 object.
21. Overloading in C#?
When methods are created with same name
, but with different signature its called
overloading.
We have types of overloading in C#:
Constructor
Function or method
Operator
22. Constructor Overloading
In Constructor overloading, n number of
constructors can be created for same
class. But the signatures of each
constructor should vary.
23. Function/Method Overloading
Method overloading allows us to write different version of
the same method in a class or derived class. Compiler
automatically select the most appropriate method based
on the parameter supplied. Method overloading occurs
when a class contains two methods with the same name,
but different signatures.
In Function overloading, n number of functions can be
created for same class. But the signatures of each function
should vary
Note - You can't have a overload method with same number parameters but different
return type. In order to create overload method, the return type must be the same and
parameter type must be different or different in numbers.
24. Operator Overloading
We had seen function overloading in the previous eg: For operator
Overloading , we will have look at the example below. We define a
class rectangle with two operator overloading methods.
Let us call the operator overloaded functions from the method
below. When first if condition is triggered, first overloaded function
in the rectangle class will be triggered. When second if condition is
triggered, second overloaded function in the rectangle class will
be triggered.
25. Method Overriding
Method overriding is a feature that allows to
invoke methods that have the same
signatures and that belong to different classes
in the same hierarchy of inheritance using the
base class reference. In C# it is done using
keywords, virtual and overrides.
26. Encapsulation
Data encapsulation is defined as the process
of data hiding the important fields from the
end user.
Data Hiding is nothing but restricting outside
access of a class members using access
modifiers such as private , protected and
internal etc.,
27. What is an Array?
An array is a collection of related instance
either value or reference types. Array posses
an immutable structure in which the number
of dimensions and size of the array are fixed
at instantiation. C# supports,
Single Dimension – it is sometimes called vector array consists of single row.
Multi Dimension Array – are rectangular and consists of rows and columns.
Jagged array – also consists of rows and columns but irregular shaped like row1 has
3 column and row 2 has 5 column.
28. Array List
ArrayList is a dynamic
array. Elements can be
added and removed
from an array list at the
runtime. In this
elements are not
automatically sorted.
The bit array collection
is a composite of bit
values. It stores 1 or 0
where 1 is true and 0 is
false. This collection
provides an efficient
means of storing and
retrieving bit values.
Bit Array
29. Hash Table
A hashTable is a collection of key value
pairs. Entries in this are instance of
DictionaryEntry type. It implements
Idictionary, Iserilizable, Ideserializable
callback interface.
30. Queue
This is a collection that
abstracts FIFO (First In
First Out) data
structure. The initial
capacity is 32
elements. It is ideal for
messaging
components.
This is a collection
that abstracts LIFO
(Last In First Out)
data structure in
which initial
capacity is 32.
Stack
31. Early Binding and late binding
Calling a non virtual method, decided at
a compile time is known as early binding.
Calling a virtual method (pure
polymorphism), decided at a runtime is
known as late binding.
32. SortedList
This is a collection and it is a combination
of key/value entries and an ArrayList
collection. Where the collection is sorted
by key.
33. Delegates
A delegate in C# allows you to pass method of
one class to objects of other class that can call
these methods.
It is a type safe function pointer. It is a type that
holds reference of a method. A delegate may be
used to call a method asynchronously.
public delegate void OperationDelegate();
34. Delegates
Single
A delegate is called single cast
delegate if it invokes a single
method. In other words we can
say that singlecast delegates
refer to a single method with
matching signature. Single cast
delegate derive from the
System.Delegate class.
Multicast
It is a delegate that
holds reference of more
than one method.
Multicast Delegates
must have a return type
of void, else there is a
runtime exception.
35. SingleCast Delegate
In the code snippet I have declared a single
delegate which takes two integer type as
arguments and returns an integer as return type.
delegate int mySingleCastDelegate(int iFirstargument, int iSecondArgument);
At runtime I have created a delegate variable as
singleCastMaxNumberDelegate of type
mySingleCastDelegate. Using the delegate
variable, I can point to any method that has the
matching signature.
In the example the method myMaxFunction has
the matching signature with the delegate variable.
So using the new keyword I have referenced the
delegate variable to the myMaxFunctionf:
mySingleCastDelegate singleCastMaxNumberDelegate = new
mySingleCastDelegate(clsSingleCastDelegate.myMaxFunction);
Now I can call the function
myMaxFunction by passing
required parameters
through the delegate.
int iMaxNumberResult = singleCastMaxNumberDelegate(10, 20);
36. MultiCast Delegate
There are two functions declared, myAddtionfunction and
myMaxFunction. Both of theses functions take two integer
type as parameters and return void. I have created three
delegate variables of type MultiCast Delegate, out of which
myDelegate assigned with null value where as the other two
delegates referenced to each of two functions.
I have used the Combine method of system.delegate to
combine the two delegate variables.
System.Delegate provides another method, remove, which
can be used to remove the specific delegate from the list.
Here the remove function is being used to remove the
myMultiCastDelegateMaxNumber function from myDelegate
list
When we run the above code snipet, then we get the
following result:
37. Asynchronous call and how it can
be implemented in delegates?
The Asynchronous calls wait for a method
before the program flow is resumed to
complete its task. In an asynchronous call,
the program flow continues while the
method is executes.
38. Reflection
It is the ability to find the information about types
contained in an assembly at runtime.
All .NET compilers produce metadata about the
types defined in the modules they produce. This
metadata is packaged along with the module
(modules in turn are packaged together in
assemblies), and can be accessed by a
mechanism called reflection.
39. Garbage Collection
Garbage collection is a mechanism that allows
the computer to detect when an object can no
longer be accessed. It then automatically releases
the memory used by that object (as well as calling
a clean-up routine, called a "finalizer," which is
written by the user). Some garbage collectors, like
the one used by .NET, compact memory and
therefore decrease your program's working set.
40. Assembly
An assembly may be an exe, a dll, an application
having an entry point, or a library. It may consist of
one or more files. An assembly maybe shared(public)
or private. The assembly, overall comprises of 3
entities: IL, Manifest, Metadata. Metadata describes
IL, whereas Manifest describes the assembly. An
assembly may be created by building the class(the
.vb or .cs file), thereby producing its DLL.
41. How to Produce Assembly?
The simplest way to produce an assembly is directly from a .NET
compiler. For example, the following C# program:
public class CTest{
public CTest() { System.Console.WriteLine( "Hello from CTest" ); }}
can be compiled into a library assembly (dll) like this:
csc /t:library ctest.cs
You can then view the contents of the assembly by running the "IL
Disassembler" tool that comes with the .NET SDK.
Alternatively you can compile your source into modules, and then
combine the modules into an assembly using the assembly linker
(al.exe). For the C# compiler, the /target:module switch is used to
generate a module instead of an assembly.
42. Global Assembly Cache
A shared assembly has version constraints.
It is stored in the Global Assembly Cache
(GAC).
GAC is a repository of shared assemblies
maintained by the .NET runtime. The
shared assemblies may be used by many
applications. To make an assembly a
shared assembly, it has to be strongly
named.
43. Satellite assembly
When you write a multilingual or multi-
cultural application in .NET, and want to
distribute the core application separately
from the localized modules, the localized
assemblies that modify the core
application are called satellite assemblies.
44. Using Statement in C#
Using statement is used to work with an object in C#
that inherits Idisposable interface.
Idisposable interface has one public method called
dispose that us used to dispose off the object. When
we use the using statement, we don’t need to
explicitly dispose the object in the code, the using
statement takes care of it.
Using statement makes the code more readable and
compact.
45. C# Preprocessor Directives
#region , #endregion :- Used to mark
sections of code that can be collapsed.
#define , #undef :-Used to define and
undefine conditional compilation symbols.
#if , #elif , #else , #endif :- These are used to
conditionally skip sections of source code.
46. Value Type & Reference Type
Value Type
As name suggest Value Type stores
“value” directly.
out keyword is used for passing a
variable for output purpose. It has
same concept as ref keyword, but
passing a ref parameter needs
variable to be initialized while out
parameter is passed without initialized.
It is useful when we want to return
more than one value from the
method.
Reference Type
As name suggest Reference Type
stores “reference” to the value.
Passing variable by value is the
default. However, we can force the
value parameter to be passed by
reference. Note: variable “must” be
initialized before it is passed into a
method.
47. Boxing & Unboxing
Boxing
It means converting value
type to reference type.
Eg: int I = 20;
string s = I.ToSting();
Un-Boxing
It means converting reference
type to value type.
Eg: int I = 20; string s = I.ToString();
//Box the int
int J = Convert.ToInt32(s); //UnBox
it back to an int
Note: Performance Overheads due to boxing and unboxing as
the boxing makes a copy of value type from stack and place it
inside an object of type System.Object in the heap
48. String & string in C#
String
String is an class
(System.String)
String is an reference
type (class)
string
string is an alias name of String
class that is created by
Microsoft
string is an value type(data
type)
string is a C# keyword.
string is a compiler shortcut for
System.String class
Note: As per above points when we use string keyword, it reaches
the System.String class and then process accordingly, So we can
say that both String and string are same
49. ILDASM
The ILDASM stands for Intermediate Language
Disassembler. This is a de-compiler which helps to get
the source code from the assembly.
This ILDASM converts an assembly to instructions from
which source code can be obtained.
The ILDASM can analyze the .dll or .exe files and
converts into human readable form. This is used to
examine assemblies and understanding the assembly
capability.
50. Debug.Write & Trace.Write
The Debug.Write will work while the application is in
both Debug Mode and Release Mode. This is
normally used while you are going to debug a
project. This will not be work when you will define
some debug points to your project.
But the Trace.write will work while the application is
only in Release Mode. This is used in released version
of an application. This will compiled when you will
define debug points in your project.
51. Exception Handler
An exception is an abnormal event or
error condition that exists in the technical
execution of a particular statement that
occurs during the program execution.
52. String Vs String Builder
String – once the string object is created,
its length and content cannot be
modified. It is slower.
StringBuilder – even after object is
created, it can be able to modify length
and content. It is faster.
53. Illustrate Server.Transfer &
Response.Redirect?
Server.Transfer, transfers the control of a web page, posting
a form data, while Response.Redirect simply redirects a
page to another page, it can not post a form data to
another page. Server.Transfer is more efficient over the
Response.Redirect, because Response.Redirect causes a
round trip to server as the page is processed once again
on the client & a request is made to server there after.
But the browser URL is not changed in case of
Server.Transfer i.e., browser history is not modified in using it.
54. Illustrate Server.Transfer &
Response.Redirect?
Server.Transfer, transfers the control of a web page, posting
a form data, while Response.Redirect simply redirects a
page to another page, it can not post a form data to
another page. Server.Transfer is more efficient over the
Response.Redirect, because Response.Redirect causes a
round trip to server as the page is processed once again
on the client & a request is made to server there after.
But the browser URL is not changed in case of
server.transfer i.e., browser history is not modified in using it.