This document provides an overview of C# and the .NET framework. It discusses C#'s history and features such as its object-oriented paradigm, execution model using the CLR and JIT compilation. The document also covers key .NET concepts like the common type system, assemblies, and the framework class library containing thousands of classes. It provides comparisons between C# and Java and examples of C# concepts like properties, events, enumerations and operator overloading.
In this chapter we will get familiar with the console as a tool for data input and output. We will explain what it is, when and how to use it, and how most programming languages access the console. We will get familiar with some of the features in C# for user interaction: reading text and numbers from the console and printing text and numbers. We will also examine the main streams for input-output operations Console.In, Console.Out and Console.Error, the Console and the usage of format strings for printing data in various formats.
03 and 04 .Operators, Expressions, working with the console and conditional s...Intro C# Book
The document discusses Java syntax and concepts including:
1. It introduces primitive data types in Java like int, float, boolean and String.
2. It covers variables, operators, and expressions - how they are used to store and manipulate data in Java.
3. It explains console input and output using Scanner and System.out methods for reading user input and printing output.
4. It provides examples of using conditional statements like if and if-else to control program flow based on conditions.
An introductory PowerPoint to understanding and applying the C++ programming language. Broken down into lessons covering:
Introduction: Definitions and the History of Programming
Lesson 1: Libraries, Variables and Types, Blocks and Namespaces, Functions
Lesson 2: If...Else Statements, For and While Loops, Scope
Exercise: Program a Gumball Game
Lesson 3: Classes and Objects, Pointers
In this chapter we will cover the conditional statements in C#, which we can use to execute different actions depending on a given condition. We will explain the syntax of the conditional operators if and if-else with suitable examples and explain the practical application of the operator for selection switch-case.
The document discusses primitive data types in C#, including integer, floating-point, boolean, character, and string types. It defines each type, provides examples of declaring variables of each type and assigning values, and describes literals that can be used to represent values of different types. Key points covered include the name, size, and default value of each primitive type as well as demonstrations of declaring and initializing variables in C#.
This document provides an overview of the C# programming language, covering topics such as its features, environment, program structure, data types, variables, operators, decision making, loops, methods, and encapsulation. It defines key C# concepts and provides examples of C# code.
In this chapter we will get familiar with primitive types and variables in Java – what they are and how to work with them. First we will consider the data types – integer types, real types with floating-point, Boolean, character, string and object type. We will continue with the variables, with their characteristics, how to declare them, how they are assigned a value and what is variable initialization.
The document provides an overview of key concepts in the C# programming language including variables and data types, arrays, conditional logic, loops, methods, parameters, and delegates. It discusses basic syntax, operators, and how to perform common tasks like type conversions and working with dates and strings. The goal is to give readers enough information to get started with C# as well as refer back to for language details while working through ASP.NET examples.
In this chapter we will get familiar with the console as a tool for data input and output. We will explain what it is, when and how to use it, and how most programming languages access the console. We will get familiar with some of the features in C# for user interaction: reading text and numbers from the console and printing text and numbers. We will also examine the main streams for input-output operations Console.In, Console.Out and Console.Error, the Console and the usage of format strings for printing data in various formats.
03 and 04 .Operators, Expressions, working with the console and conditional s...Intro C# Book
The document discusses Java syntax and concepts including:
1. It introduces primitive data types in Java like int, float, boolean and String.
2. It covers variables, operators, and expressions - how they are used to store and manipulate data in Java.
3. It explains console input and output using Scanner and System.out methods for reading user input and printing output.
4. It provides examples of using conditional statements like if and if-else to control program flow based on conditions.
An introductory PowerPoint to understanding and applying the C++ programming language. Broken down into lessons covering:
Introduction: Definitions and the History of Programming
Lesson 1: Libraries, Variables and Types, Blocks and Namespaces, Functions
Lesson 2: If...Else Statements, For and While Loops, Scope
Exercise: Program a Gumball Game
Lesson 3: Classes and Objects, Pointers
In this chapter we will cover the conditional statements in C#, which we can use to execute different actions depending on a given condition. We will explain the syntax of the conditional operators if and if-else with suitable examples and explain the practical application of the operator for selection switch-case.
The document discusses primitive data types in C#, including integer, floating-point, boolean, character, and string types. It defines each type, provides examples of declaring variables of each type and assigning values, and describes literals that can be used to represent values of different types. Key points covered include the name, size, and default value of each primitive type as well as demonstrations of declaring and initializing variables in C#.
This document provides an overview of the C# programming language, covering topics such as its features, environment, program structure, data types, variables, operators, decision making, loops, methods, and encapsulation. It defines key C# concepts and provides examples of C# code.
In this chapter we will get familiar with primitive types and variables in Java – what they are and how to work with them. First we will consider the data types – integer types, real types with floating-point, Boolean, character, string and object type. We will continue with the variables, with their characteristics, how to declare them, how they are assigned a value and what is variable initialization.
The document provides an overview of key concepts in the C# programming language including variables and data types, arrays, conditional logic, loops, methods, parameters, and delegates. It discusses basic syntax, operators, and how to perform common tasks like type conversions and working with dates and strings. The goal is to give readers enough information to get started with C# as well as refer back to for language details while working through ASP.NET examples.
The document provides an overview of the C# programming language, covering topics such as data types, operators, expressions, statements, console I/O, loops, arrays, and methods. It describes the various primitive data types in C#, including integer, floating-point, fixed-point, boolean, character, string, and object types. It also discusses variables and identifiers in C#, explaining how to declare variables and the syntax rules for identifiers.
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Chris Adamson
The document provides an overview of the C programming language. It begins by explaining that Objective-C extends standard ANSI C with object-oriented capabilities. It then discusses why C remains important today due to its use in libraries, operating systems, and as the base for many other popular languages. The document proceeds to cover basic C concepts like variables, data types, functions, flow control, pointers, memory allocation, and I/O parameters. It emphasizes that C provides high performance with a minimal footprint while abstracting away the CPU and memory.
This document discusses exception handling in .NET. It defines exceptions as objects that are thrown when errors or unexpected events occur during program execution. Exceptions allow errors to be handled at multiple levels through try-catch blocks. The core exception class is System.Exception, which other custom exceptions inherit from. Exceptions can be thrown manually with throw or occur automatically from errors. Finally blocks ensure code is always executed even if an exception is thrown.
03. Operators Expressions and statementsIntro C# Book
In this chapter we will get acquainted with the operators in C# and the actions they can perform on the different data types. We will explain the priorities of the operators and we will analyze the different types of operators, according to the count of the arguments they can take and the actions they can perform. In the second part we will examine the conversion of data types. We will explain when and why it is needed to be done and how to work with different data types. At the end of the chapter we will pay special attention to the expressions and how we should work with them.
For More :
https://www.facebook.com/Computer-Programming-Assignments-826290177441561/
-
https://www.facebook.com/A-Tech-and-Software-Development-1683037138630673/
This document provides an overview of C# data types, operators, expressions, statements, and other fundamental concepts. It discusses the different primitive data types in C#, including integer, floating-point, boolean, character, and string types. It also covers literals, variables, operators such as arithmetic, logical, comparison, and assignment, and shows examples of using each concept. The document is intended to teach basic C# syntax and semantics.
The document provides an overview of Unit 1 of a Python programming course taught by Dr. C. Sreedhar. Unit 1 covers introduction to Python including its history, installation, execution, commenting, data types, operators, and writing simple programs. It discusses Python's character set, tokens, core data types, I/O functions, assigning values to variables, and multiple assignments. Operators and expressions such as arithmetic, comparison, logical, and bitwise operators are also covered. Examples of simple Python programs are provided.
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.
Esoft Metro Campus - Certificate in c / c++ programmingRasan Samarasinghe
Esoft Metro Campus - Certificate in java basics
(Template - Virtusa Corporate)
Contents:
Structure of a program
Variables & Data types
Constants
Operators
Basic Input/output
Control Structures
Functions
Arrays
Character Sequences
Pointers and Dynamic Memory
Unions
Other Data Types
Input/output with files
Searching
Sorting
Introduction to data structures
19. Data Structures and Algorithm ComplexityIntro C# Book
In this chapter we will compare the data structures we have learned so far by the performance (execution speed) of the basic operations (addition, search, deletion, etc.). We will give specific tips in what situations what data structures to use. We will explain how to choose between data structures like hash-tables, arrays, dynamic arrays and sets implemented by hash-tables or balanced trees. Almost all of these structures are implemented as part of NET Framework, so to be able to write efficient and reliable code we have to learn to apply the most appropriate structures for each situation.
C# is a component-oriented programming language that builds on the .NET framework. It has a familiar C-like syntax that is easy for developers familiar with C, C++, Java, and Visual Basic to adopt. C# is fully object-oriented and optimized for building .NET applications. Everything in C# belongs to a class, with basic data types including integers, floats, booleans, characters, and strings. C# supports common programming constructs like variables, conditional statements, loops, methods, and classes. C# can be easily combined with ASP.NET for building web applications in a powerful, fast, and high-level way.
C++11 introduced several new features to C++ that support modern programming patterns like lambdas, smart pointers, and move semantics. Lambdas allow for anonymous inline functions, which improve code readability and eliminate the need for functor classes. Smart pointers like unique_ptr and shared_ptr make memory management safer and more straightforward using features like move semantics and RAII. C++11 also aims to bring C++ more in line with modern hardware by supporting multi-threading and higher level abstractions while maintaining performance.
Learning C++ - Introduction to c++ programming 1Ali Aminian
This document provides an introduction to C++ programming, covering key concepts like the workspace, basics of the C++ environment, data types, and operations. It discusses setting up a Microsoft Visual Studio workspace and comments. The basics section explains preprocessor directives, header files, the main function framework, and input/output streams. Data types covered include integers, floating point, Boolean, characters, and enums. Operations explained are conditionals, loops like for and while, and logical/comparison operators. The document aims to familiarize readers with fundamental C++ concepts.
In this chapter we will get more familiar with what methods are and why we need to use them. The reader will be shown how to declare methods, what parameters are and what a method’s signature is, how to call a method, how to pass arguments of methods and how methods return values. At the end of this chapter we will know how to create our own method and how to use (invoke) it whenever necessary. Eventually, we will suggest some good practices in working with methods. The content of this chapter accompanied by detailed examples and exercises that will help the reader practice the learned material.
Esoft Metro Campus - Diploma in Information Technology - (Module IX) Programming with C#.NET
(Template - Virtusa Corporate)
Contents:
Introduction to .NET Framework
.NET Framework Platform Architecture
Microsoft Visual Studio
C# Language
C#, VS and .NET Framework Versions
Your First C# Application
Printing Statements
Comments in C#
Common Type System
Value Types and Reference Type
Variables Declaration in C#
Type Conversion
Arithmetic Operators
Assignment Operators
Comparison Operators
Logical Operators
If Statement
If… Else Statement
If… Else if… Else Statement
Nested If Statement
Switch Statement
While Loop
Do While Loop
For Loop
Arrays
Accessing Arrays using foreach Loop
Two Dimensional Arrays
Classes and Objects in C#
Inheritance in C#
Partial Classes
Namespaces
Windows Forms Applications
Using Buttons, Labels and Text Boxes
Displaying Message Boxes
Error Handling with Try… Catch… finally…
Using Radio Buttons
Using Check Boxes
Using List Boxes
Creating Menus
Creating ToolStrips
MDI Forms
Database Application in C#
Creating a Simple Database Application
SQL Insert / Update / Retrieving / Delete
SQL Command Execute Methods
Data Sets
Presentation with a brief history of C, C++ and their ancestors along with an introduction to latest version C++11 and futures such as C++17. The presentation covers applications that use C++, C++11 compilers such as LLVM/Clang, some of the new language features in C++11 and C++17 and examples of modern idioms such as the new form compressions, initializer lists, lambdas, compile time type identification, improved memory management and improved standard library (threads, math, random, chrono, etc). (less == more) || (more == more)
Slides from my "Gentle Introduction to Modern C++" presentation from January 20, 2015 at the Dublin C/C++ User Group: www.meetup.com/cppdug/events/219787667/
The code examples are located here: https://github.com/mihaitodor/Presentations/tree/master/cppdug/20.01.2015
The document provides an overview of the C# programming language, covering topics such as data types, operators, expressions, statements, console I/O, loops, arrays, and methods. It describes the various primitive data types in C#, including integer, floating-point, fixed-point, boolean, character, string, and object types. It also discusses variables and identifiers in C#, explaining how to declare variables and the syntax rules for identifiers.
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Chris Adamson
The document provides an overview of the C programming language. It begins by explaining that Objective-C extends standard ANSI C with object-oriented capabilities. It then discusses why C remains important today due to its use in libraries, operating systems, and as the base for many other popular languages. The document proceeds to cover basic C concepts like variables, data types, functions, flow control, pointers, memory allocation, and I/O parameters. It emphasizes that C provides high performance with a minimal footprint while abstracting away the CPU and memory.
This document discusses exception handling in .NET. It defines exceptions as objects that are thrown when errors or unexpected events occur during program execution. Exceptions allow errors to be handled at multiple levels through try-catch blocks. The core exception class is System.Exception, which other custom exceptions inherit from. Exceptions can be thrown manually with throw or occur automatically from errors. Finally blocks ensure code is always executed even if an exception is thrown.
03. Operators Expressions and statementsIntro C# Book
In this chapter we will get acquainted with the operators in C# and the actions they can perform on the different data types. We will explain the priorities of the operators and we will analyze the different types of operators, according to the count of the arguments they can take and the actions they can perform. In the second part we will examine the conversion of data types. We will explain when and why it is needed to be done and how to work with different data types. At the end of the chapter we will pay special attention to the expressions and how we should work with them.
For More :
https://www.facebook.com/Computer-Programming-Assignments-826290177441561/
-
https://www.facebook.com/A-Tech-and-Software-Development-1683037138630673/
This document provides an overview of C# data types, operators, expressions, statements, and other fundamental concepts. It discusses the different primitive data types in C#, including integer, floating-point, boolean, character, and string types. It also covers literals, variables, operators such as arithmetic, logical, comparison, and assignment, and shows examples of using each concept. The document is intended to teach basic C# syntax and semantics.
The document provides an overview of Unit 1 of a Python programming course taught by Dr. C. Sreedhar. Unit 1 covers introduction to Python including its history, installation, execution, commenting, data types, operators, and writing simple programs. It discusses Python's character set, tokens, core data types, I/O functions, assigning values to variables, and multiple assignments. Operators and expressions such as arithmetic, comparison, logical, and bitwise operators are also covered. Examples of simple Python programs are provided.
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.
Esoft Metro Campus - Certificate in c / c++ programmingRasan Samarasinghe
Esoft Metro Campus - Certificate in java basics
(Template - Virtusa Corporate)
Contents:
Structure of a program
Variables & Data types
Constants
Operators
Basic Input/output
Control Structures
Functions
Arrays
Character Sequences
Pointers and Dynamic Memory
Unions
Other Data Types
Input/output with files
Searching
Sorting
Introduction to data structures
19. Data Structures and Algorithm ComplexityIntro C# Book
In this chapter we will compare the data structures we have learned so far by the performance (execution speed) of the basic operations (addition, search, deletion, etc.). We will give specific tips in what situations what data structures to use. We will explain how to choose between data structures like hash-tables, arrays, dynamic arrays and sets implemented by hash-tables or balanced trees. Almost all of these structures are implemented as part of NET Framework, so to be able to write efficient and reliable code we have to learn to apply the most appropriate structures for each situation.
C# is a component-oriented programming language that builds on the .NET framework. It has a familiar C-like syntax that is easy for developers familiar with C, C++, Java, and Visual Basic to adopt. C# is fully object-oriented and optimized for building .NET applications. Everything in C# belongs to a class, with basic data types including integers, floats, booleans, characters, and strings. C# supports common programming constructs like variables, conditional statements, loops, methods, and classes. C# can be easily combined with ASP.NET for building web applications in a powerful, fast, and high-level way.
C++11 introduced several new features to C++ that support modern programming patterns like lambdas, smart pointers, and move semantics. Lambdas allow for anonymous inline functions, which improve code readability and eliminate the need for functor classes. Smart pointers like unique_ptr and shared_ptr make memory management safer and more straightforward using features like move semantics and RAII. C++11 also aims to bring C++ more in line with modern hardware by supporting multi-threading and higher level abstractions while maintaining performance.
Learning C++ - Introduction to c++ programming 1Ali Aminian
This document provides an introduction to C++ programming, covering key concepts like the workspace, basics of the C++ environment, data types, and operations. It discusses setting up a Microsoft Visual Studio workspace and comments. The basics section explains preprocessor directives, header files, the main function framework, and input/output streams. Data types covered include integers, floating point, Boolean, characters, and enums. Operations explained are conditionals, loops like for and while, and logical/comparison operators. The document aims to familiarize readers with fundamental C++ concepts.
In this chapter we will get more familiar with what methods are and why we need to use them. The reader will be shown how to declare methods, what parameters are and what a method’s signature is, how to call a method, how to pass arguments of methods and how methods return values. At the end of this chapter we will know how to create our own method and how to use (invoke) it whenever necessary. Eventually, we will suggest some good practices in working with methods. The content of this chapter accompanied by detailed examples and exercises that will help the reader practice the learned material.
Esoft Metro Campus - Diploma in Information Technology - (Module IX) Programming with C#.NET
(Template - Virtusa Corporate)
Contents:
Introduction to .NET Framework
.NET Framework Platform Architecture
Microsoft Visual Studio
C# Language
C#, VS and .NET Framework Versions
Your First C# Application
Printing Statements
Comments in C#
Common Type System
Value Types and Reference Type
Variables Declaration in C#
Type Conversion
Arithmetic Operators
Assignment Operators
Comparison Operators
Logical Operators
If Statement
If… Else Statement
If… Else if… Else Statement
Nested If Statement
Switch Statement
While Loop
Do While Loop
For Loop
Arrays
Accessing Arrays using foreach Loop
Two Dimensional Arrays
Classes and Objects in C#
Inheritance in C#
Partial Classes
Namespaces
Windows Forms Applications
Using Buttons, Labels and Text Boxes
Displaying Message Boxes
Error Handling with Try… Catch… finally…
Using Radio Buttons
Using Check Boxes
Using List Boxes
Creating Menus
Creating ToolStrips
MDI Forms
Database Application in C#
Creating a Simple Database Application
SQL Insert / Update / Retrieving / Delete
SQL Command Execute Methods
Data Sets
Presentation with a brief history of C, C++ and their ancestors along with an introduction to latest version C++11 and futures such as C++17. The presentation covers applications that use C++, C++11 compilers such as LLVM/Clang, some of the new language features in C++11 and C++17 and examples of modern idioms such as the new form compressions, initializer lists, lambdas, compile time type identification, improved memory management and improved standard library (threads, math, random, chrono, etc). (less == more) || (more == more)
Slides from my "Gentle Introduction to Modern C++" presentation from January 20, 2015 at the Dublin C/C++ User Group: www.meetup.com/cppdug/events/219787667/
The code examples are located here: https://github.com/mihaitodor/Presentations/tree/master/cppdug/20.01.2015
offered for free use by the user "skyhawk133" at dreamincode.com, http://www.dreamincode.net/forums/showtopic34988.htm
Summary:
C# Basics Quick Reference Sheet Includes:
Namespace
Data Types
Variable Declaration
Type Declaration
Suffixes
Arrays
Comments
Line Continuation
Arithmetic Operators
String Concatenation
Relational Operators
Logical Operators
String Manipulation
If/Else Statement
Inline If Statement
For Loop
For Each Loop
While Loop
Do-While Loop
Select Case Statement
Function Structure
Class Structure
Error Handling
C# allows operators like + and - to be overloaded for custom classes. Operator overloading is implemented by defining static operator methods that specify the behavior of operators on class instances. Operators can be overloaded to work on one or two operands, and conversion operators allow implicit or explicit conversion between types. This allows custom classes to integrate seamlessly into C# code by supporting common operators and type conversions.
This document provides a summary of C# programming concepts including:
1. A brief history of C# versions from 2.0 to 7.0 and the new features introduced in each.
2. An overview of common C# data structures like arrays, lists, dictionaries and how to initialize and manipulate them.
3. A high-level summary of C# control structures like if/else statements, for/foreach loops, and try/catch blocks for exception handling.
Demo Project:
• Complex Calculator
What will you learn?
• Adding single event handlers for Multiple Buttons
• Identifying from which button handler is called.
• Using flag variable to write smart code.
This document provides an overview of WinForms GUI programming in .NET. It discusses how event-driven programming works in WinForms applications and how Visual Studio supports drag-and-drop design of WinForms. It also describes some key concepts like forms, controls, properties and events. The document explains how to set up a basic WinForms application and interact with common controls like labels, text boxes and buttons.
This document summarizes data types in C#, including value types (such as int, float, enumerations, and structs), reference types (such as objects, strings, classes, arrays, and delegates), and how everything inherits from System.Object. It explains that value types directly contain variable data while reference types contain a reference to the data. The document also outlines the hierarchies for value types and reference types.
This document discusses Microsoft's .NET framework and its confrontation with Sun Microsystems' Java platform. It provides an overview of key aspects of .NET such as the Common Language Runtime (CLR), Microsoft Intermediate Language (MSIL), and support for multiple programming languages. It also compares .NET's approach of targeting a virtual machine to traditional compiled languages that target specific operating systems and hardware configurations.
The document discusses various window controls in C# .NET including message boxes, forms, buttons, labels, text boxes, check boxes, radio buttons, date/time pickers, progress bars, and dialog boxes. It provides details on how to use each control, its purpose, and relevant properties.
The document provides an overview of the basics of C# 2008 .NET 3.0/3.5, including the basic structure of a C# program, namespaces, classes, methods, variables, data types, operators, flow control, arrays, namespaces, console input/output, and comments. It discusses key concepts such as object-oriented programming fundamentals, console applications in Visual Studio 2008, and more advanced topics such as checked and unchecked operators.
Operator overloading allows redefining the behavior of operators for user-defined types. It is done by declaring special functions. There are two main types - unary operator overloading, which can redefine ++ and -- operators, and binary operator overloading, where at least one operand must be of the enclosing type. Common binary operators that can be overloaded include arithmetic, comparison, and bitwise operators. Overloading ensures operators have the same natural meaning for user-defined types as they do for built-in types.
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
The document provides an overview of C# for Java developers. It discusses that C# is an Ecma and ISO standard developed by Microsoft for use in .NET and Windows Phone 7. It also covers the Common Language Infrastructure (CLI) which includes the Common Type System (CTS), Common Language Specification (CLS), Virtual Execution System (VES), and Common Intermediate Language (CIL). The document then compares C# to Java in areas like memory handling, keywords, object-oriented concepts, and more.
Thrift is a software framework that allows for efficient cross-language communication. It provides features such as RPC, code generation, and serialization to make it easy to define and develop services that can be used across multiple languages. Supported languages include C++, Java, Python, PHP and more. Thrift handles low-level details like data serialization while providing an interface definition language to define services and data structures.
The document summarizes updates and future plans for .NET Core and C#. Key points include:
- .NET Standard 2.0 provides over 32,000 APIs, allowing better cross-platform compatibility.
- C# 7.0 introduced features like tuples, pattern matching, and binary literals. Future versions will focus on smaller releases with opt-in features like recursive patterns and nullable reference types.
- The tooling ecosystem including Visual Studio and the dotnet CLI continue to improve with a shared SDK and common project format.
The document discusses C++ and its evolution over time. Some key points include:
- C++ has been active for over 30 years and remains relevant due to its performance and use in applications like mobile.
- The new C++11 standard adds many new features that make the language more powerful yet easier to use, such as rvalue references, lambdas, and type inference.
- Examples are provided showing how new C++11 features like futures, lambdas and static assertions can be used concisely to solve common programming problems in a more modern style.
This document provides an overview of key concepts in C++ including:
- Similarities and differences between C and C++ and how that impacts language selection
- Common C++ concepts like namespaces, functions, variables, statements, and data types
- Object-oriented programming principles in C++ like encapsulation, inheritance, and polymorphism
- Additional C++ features like templates, the standard template library (STL), streams, files, and exceptions handling
It aims to help readers understand fundamental C++ concepts to get started with application development.
This document provides an overview of key concepts in C++ including:
- Similarities and differences between C and C++ and how that impacts language selection
- Common C++ concepts like namespaces, functions, variables, statements, and data types
- Object-oriented programming principles in C++ like encapsulation, inheritance, and polymorphism
- Additional C++ features like templates, the standard template library (STL), streams, and exceptions handling
The document is intended as a high-level introduction and reference for C++ concepts.
The document provides an introduction to the C# programming language. It discusses some of the key ideas and concepts of C# including that it is a component-oriented language where everything is an object. It aims to provide robust and durable software through features like garbage collection, exceptions, and type safety. C# also aims to preserve investments in existing code through interoperability and allowing C++ constructs. The document then provides examples and explanations of various C# language features like classes, structs, interfaces, properties, events, and attributes.
C# is a component-oriented language that introduces object-oriented improvements to the C/C++ family of languages. Everything in C# is an object, providing a unified type system without performance costs. C# aims to produce robust, durable software using techniques like garbage collection and exceptions, while preserving investments in existing C/C++ code through interoperability. The document provides an overview of key C# concepts like classes, interfaces, attributes, events, operators and more.
C# is a component-oriented language that introduces object-oriented improvements to the C/C++ family of languages. Everything in C# is an object, providing a unified type system without performance costs. C# aims to produce robust, durable software using techniques like garbage collection and exceptions, while preserving investments in existing C/C++ code through interoperability. The document provides an overview of key C# concepts like classes, interfaces, attributes, and events to illustrate how C# supports component-based development.
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...NALESVPMEngg
The document provides an introduction to the C# programming language. It discusses some of the key ideas and concepts of C# including that it is a component-oriented language where everything is an object. It aims to provide robust and durable software through features like garbage collection, exceptions, and type safety. C# also aims to preserve investments in existing code through interoperability and allowing C++ constructs. The document then provides examples and explanations of various C# language features like classes, structs, interfaces, properties, events, and attributes.
This document discusses transitioning from .NET/XAML development to web development using HTML, JavaScript, and TypeScript. It covers choosing TypeScript and a MVVM framework like Knockout to leverage existing skills in data binding, object-oriented programming, and requirements handling. The document demonstrates TypeScript features like classes, inheritance, interfaces and generics. It also shows how to implement the MVVM pattern in Knockout through data binding, commands, and iterating over collections.
The Ring programming language version 1.10 book - Part 102 of 212Mahmoud Samir Fayed
This document discusses Ring's architecture and memory management.
Ring applications are written in Ring and use Ring libraries and extensions. Ring libraries are written in Ring, while extensions are dynamic libraries written in C/C++ that interface with the Ring Virtual Machine (VM). The VM is written in C and runs on the host operating system.
Ring uses scope-based memory management. When a function is called, a new scope is created. Variables declared within the function exist only within this scope and are destroyed when the function exits. Ring also uses reference counting for memory management of objects.
C# is a component-oriented language that introduces object-oriented improvements to the C/C++ family of languages. Key features include garbage collection, exceptions, type safety, and preservation of investments in C++. C# supports classes, interfaces, structs, enums, delegates and events to provide a unified object model.
C# is a component-oriented language that introduces object-oriented improvements to the C/C++ family of languages. Key features include garbage collection, exceptions, type safety, and preservation of C++ investments like namespaces and enums. Everything in C# is an object, unifying value and reference types without performance penalties. The language supports robust features like properties, events, generics and attributes to enable component-based development.
This document provides a summary of an introduction to the Clojure programming language. It discusses what Clojure is, its timeline and adoption, functional programming concepts, concurrency features using Software Transactional Memory, the Lisp ideology it is based on including homoiconicity and its macro system. It also provides an overview of getting started with Clojure including using the REPL, basic syntax like symbols and keywords, data types, sequences, functions, and Java interoperability. Resources for learning more about Clojure are also listed.
The document introduces C# as the first component-oriented language in the C/C++ family. It discusses key features of C# including everything being an object, robust and durable software through garbage collection and exceptions, and preservation of investment from C++. It provides examples of basic C# concepts like classes, structs, interfaces, enums, delegates, properties and events.
The document introduces C# as the first component-oriented language in the C/C++ family. It discusses key features of C# including everything being an object, robust and durable software, and preservation of investment from other languages. It provides examples of basic C# syntax and programming structures.
The document introduces C# as the first component-oriented language in the C/C++ family. It discusses key features of C# including everything being an object, robust and durable software, preservation of investment from C++, and providing a unified type system where all types ultimately inherit from object. It provides examples of key C# concepts like classes, structs, interfaces, enums, delegates, properties, events, and attributes.
The document introduces C# as the first component-oriented language in the C/C++ family. It discusses key features of C# including everything being an object, robust and durable software through garbage collection and exceptions, and preservation of investment from C++. It provides examples of basic C# concepts like classes, structs, interfaces, enums, delegates, properties and events.
Similar to Dr archana dhawan bajaj - c# dot net (20)
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
This document appears to be a list of individuals with details of interest payments made to them on September 29, 2016 from account number 6177. It includes fields like names, addresses, pincodes, description of payment as "Interest on matured debentures", amounts paid ranging from Rs. 562.92 to Rs. 6435.90. The list has details of over 60 individuals from different states and countries like India, Kuwait.
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
Dr archana dhawan bajaj - cognizant combined campus - list of selected studentsDr-archana-dhawan-bajaj
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice experience in maternity primarily in relation to corporate and international matter delivery.Dr archana dhawan bajaj's Sales JetView.Dr archana dhawan bajaj is a renowned practising doctor of non-commercial of India and Dr archana various Hospitals and Meternity.Dr archana dhawan bajaj has a PH.d master's degree in both human & International client Management along with other fellow.Dr archana is known to be proficient in Hindi,English,Sanskrit and Urdu.Dr archana dhawan bajaj has acquired extensive practice exp
Basavarajeeyam is an important text for ayurvedic physician belonging to andhra pradehs. It is a popular compendium in various parts of our country as well as in andhra pradesh. The content of the text was presented in sanskrit and telugu language (Bilingual). One of the most famous book in ayurvedic pharmaceutics and therapeutics. This book contains 25 chapters called as prakaranas. Many rasaoushadis were explained, pioneer of dhatu druti, nadi pareeksha, mutra pareeksha etc. Belongs to the period of 15-16 century. New diseases like upadamsha, phiranga rogas are explained.
ABDOMINAL TRAUMA in pediatrics part one.drhasanrajab
Abdominal trauma in pediatrics refers to injuries or damage to the abdominal organs in children. It can occur due to various causes such as falls, motor vehicle accidents, sports-related injuries, and physical abuse. Children are more vulnerable to abdominal trauma due to their unique anatomical and physiological characteristics. Signs and symptoms include abdominal pain, tenderness, distension, vomiting, and signs of shock. Diagnosis involves physical examination, imaging studies, and laboratory tests. Management depends on the severity and may involve conservative treatment or surgical intervention. Prevention is crucial in reducing the incidence of abdominal trauma in children.
Rasamanikya is a excellent preparation in the field of Rasashastra, it is used in various Kushtha Roga, Shwasa, Vicharchika, Bhagandara, Vatarakta, and Phiranga Roga. In this article Preparation& Comparative analytical profile for both Formulationon i.e Rasamanikya prepared by Kushmanda swarasa & Churnodhaka Shodita Haratala. The study aims to provide insights into the comparative efficacy and analytical aspects of these formulations for enhanced therapeutic outcomes.
Basavarajeeyam is a Sreshta Sangraha grantha (Compiled book ), written by Neelkanta kotturu Basavaraja Virachita. It contains 25 Prakaranas, First 24 Chapters related to Rogas& 25th to Rasadravyas.
Local Advanced Lung Cancer: Artificial Intelligence, Synergetics, Complex Sys...Oleg Kshivets
Overall life span (LS) was 1671.7±1721.6 days and cumulative 5YS reached 62.4%, 10 years – 50.4%, 20 years – 44.6%. 94 LCP lived more than 5 years without cancer (LS=2958.6±1723.6 days), 22 – more than 10 years (LS=5571±1841.8 days). 67 LCP died because of LC (LS=471.9±344 days). AT significantly improved 5YS (68% vs. 53.7%) (P=0.028 by log-rank test). Cox modeling displayed that 5YS of LCP significantly depended on: N0-N12, T3-4, blood cell circuit, cell ratio factors (ratio between cancer cells-CC and blood cells subpopulations), LC cell dynamics, recalcification time, heparin tolerance, prothrombin index, protein, AT, procedure type (P=0.000-0.031). Neural networks, genetic algorithm selection and bootstrap simulation revealed relationships between 5YS and N0-12 (rank=1), thrombocytes/CC (rank=2), segmented neutrophils/CC (3), eosinophils/CC (4), erythrocytes/CC (5), healthy cells/CC (6), lymphocytes/CC (7), stick neutrophils/CC (8), leucocytes/CC (9), monocytes/CC (10). Correct prediction of 5YS was 100% by neural networks computing (error=0.000; area under ROC curve=1.0).
Here is the updated list of Top Best Ayurvedic medicine for Gas and Indigestion and those are Gas-O-Go Syp for Dyspepsia | Lavizyme Syrup for Acidity | Yumzyme Hepatoprotective Capsules etc
Integrating Ayurveda into Parkinson’s Management: A Holistic ApproachAyurveda ForAll
Explore the benefits of combining Ayurveda with conventional Parkinson's treatments. Learn how a holistic approach can manage symptoms, enhance well-being, and balance body energies. Discover the steps to safely integrate Ayurvedic practices into your Parkinson’s care plan, including expert guidance on diet, herbal remedies, and lifestyle modifications.
Promoting Wellbeing - Applied Social Psychology - Psychology SuperNotesPsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
share - Lions, tigers, AI and health misinformation, oh my!.pptxTina Purnat
• Pitfalls and pivots needed to use AI effectively in public health
• Evidence-based strategies to address health misinformation effectively
• Building trust with communities online and offline
• Equipping health professionals to address questions, concerns and health misinformation
• Assessing risk and mitigating harm from adverse health narratives in communities, health workforce and health system
share - Lions, tigers, AI and health misinformation, oh my!.pptx
Dr archana dhawan bajaj - c# dot net
1. 1
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
5. Operator Overloading
6. Event driven programming
7. .NET Framework Class Library
8. A GUI in C#
9. A web service in C#
2. 2
C# and .NET
1. Introduction
• History
• C# features
• .NET framework
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
5. ...
3. 3
History
Builds on legacy from
• C/C++ tradition -> new programming language C#
• Java tradition : many ideas borrowed
• runtime environment : virtual machine
• platform/language abstraction
• guarded execution environment
• garbage collection
• single rooted hierarchy
• ...
Takes software development one step further towards
component based design
5. 5
C# features :
component oriented
Modern large-scale systems are component based
Properties
get/set
event based communication
support to annotate component for
- deployment
- configuration at design and/or runtime
- component versioning
- documentation
6. 6
C# features : OO paradigm
supports all typical OO mechanisms
• encapsulation
• inheritance
• polymorphism
• interface based programming
C++ legacy (NOT supported in Java)
• support for operator overloading
• user defined type conversions
• rectangular arrays
• pass-by-reference
7. 7
C# features :
Excution model
NO own runtime library
- uses .NET library (redesign of MS-library)
(implemented in C#)
Compiles to intermediary language
(CIL - Common Intermediate Language)
Executed by virtual machine
(CLR – Common Language Runtime)
- memory management through garbage collection
- guarded execution (e.g. array bounds guarding)
- JIT compilation
9. 9
.NET execution model
Platform AND language portability
CLR can exploit processor/platform specific optimizations
Supported languages :
C#, J#, VB.NET, JScript, Microsoft IL, Managed Extensions for C++
Supplied by 3rd
parties :
COBOL, Eiffel, Haskell, Forth, Scheme, Smalltalk, Pascal, ...
CLR
Compiler
Application Code in “A Language”
CIL
10. 10
.NET :
Common Type System
Cross language type system, allowing
- type safety
- cross language integration
- execution services (garbage collection, JIT, exceptions, ...)
Defines rules to define types, irrespective of source language
All types eventually mapped to CTS-types
e.g. cross language inheritance
J# class inherits from C# class
Minimum subset for language to be supported by .NET :
CLS – Common Language Specification
- CLS-compliant language = “CLS consumer”
- if more than CLS : “CLS extender”
C#= both CLS consumer and extender
12. 12
Hello
namespace Project1
{ using System;
class Class1
{ static void Main() {
Console.WriteLine("Hello there !");
for (int i = 0; i < 10; i++)
Console.WriteLine(i);
}
}
}
package project1;
import java.lang.*;
class Class1 {
public static void main(String[] args) {
System.out.println("Hello there !");
for (int i = 0; i < 10; i++)
System.out.println(i);
}
}
C#
Java
13. 13
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
14. 14
C# - Java :
common approaches
Both intended as improvement to C++
• Compilation to machine independent language, managed execution
• Garbage Collection, no pointers
(C# allows pointer usage in special “unsafe” code sections)
• Reflection API
• No header files, no problems with circular (type) references
• Single rooted hierarchy, objects allocated on the heap
• Thread support by object-level lock
• Multiple extension of interfaces, single inheritance for classes
• Inner classes (closure instead of nested class)
• Simple inheritance rules (no inheritance modifiers)
• Everything is in a class (no global data, no global functions)
• Arrays, strings : bounds checked at execution time
• Systematic usage of “.” (instead of “->” and “::”)
• Keywords for null pointer (null) and boolean type (boolean/bool)
• Guaranteed initialization
• if-statement controlled by boolean (instead of integer)
• Finally-clause in try-catch blocks
15. 15
Properties
C# : special support for getters/setters
Java : implied by coding convention (template or “design pattern”)
Property int min
Java style :
public int getMin() {return min;}
public void setMin(int m) {min=m;}
C# style :
public int Min {
get {return min;}
set {min=value;}
}
// value : implicit variable used when
// calling setter method
- getter/setter grouped together
- encourages to think in terms of properties
16. 16
IndexerMeans to index underlying datastructure
Java style :
public class Bookshop {
private Book[] books;
// ...
public void setBooks(int i,Book b) {
if(b!=null) books[i]=b;
}
public Book getBooks(int i) {return books[i];}
}
C# style :
public class Bookshop
{
private Book[] books;
// ...
public Book this[int i]{
get {return books[i];}
set {if(value!=null) books[i]=value;}
}
}
// ...
Bookshop standaard=new Bookshop();
standaard[10]=new Book(“Harry Potter”);
17. 17
Event handling
Delegates used to handle events
- Java equivalent : inner class object
- C/C++ equivalent : function pointer
Direct support in C# for events
public delegate void TempChangeHandler(double t,ref bool cancel);
public class Thermometer {
public event TempChangeHandler TempChange;
double temp;
public double Temperature{
get{return temp;}
set{if(temp!=value) {
bool cancel=false;
TempChange(value,ref cancel); // fire event
if(!cancel) temp=value;
}
}
}
18. 18
Event handling
public class TempController {
public TempController(Thermometer tm) {
tm.TempChange+=new TempChangeHandler(tm_TempChange);
}
private void tm_TempChange(double t,ref bool cancel) {
if(t>100) {
cancel=true;
System.Console.WriteLine(
"Way too hot : WRONG VALUE");
} else {
System.Console.WriteLine(
"New temperature registered.");
}
}
}
19. 19
Event handling
public class Test {
public static void Main() {
Thermometer term=new Thermometer();
TempController tc=new TempController(term);
term.Temperature=30;
Console.WriteLine("Temp = {0}",term.Temperature);
term.Temperature=120;
Console.WriteLine("Temp = {0}",term.Temperature);
}
}
20. 20
Enummerations
Standard Java approach
public class Period {
public final static int DAILY=1;
public final static int WEEKLY=2;
public final static int MONTHLY=3;
public final static int YEARLY=4;
}
// ...
int publicationPeriod=Period.DAILY;
// PROBLEM : does not prevent int publicationPeriod=12; ???
C# approach
public enum Period{DAILY=1,WEEKLY=2,MONTHLY=3,YEARLY=4};
Period publicationPeriod = Period.WEEKLY;
22. 22
Iterating over a Collection
Standard Java approach
for(Iterator i=collection.iterator();i.hasNext();) {
Object o=i.next();
// do something with o
}
for(int i=0;i<array.length;i++) {
// do something with array[i]
}
C# approach
foreach(object o in collection) {
// do something with o
}
foreach(int i in array) {
// do something with i
}
Java 5 approach
for(Object o : collection) {
// do something with o
}
for(int i : array) { // do something with i
}
23. 23
Extension on
“primitive” typesC# struct datatype :
- very similar to class (defines attributes and methods)
- BUT : - allocated on the stack or in-line (instead of heap)
- value type -> pass by value by default
- efficient for small types
- usage similar to usage of primitive types in Java
struct CoupleV
{
private int x, y;
public int X
{
set { x = value; }
get { return x; }
}
public int Y
{
set { y = value; }
get { return y; }
}
public string ToString()
{
return "(" + x + "," + y + ")";
}
24. 24
Extension on
“primitive” types
public static void Main()
{
CoupleV p = new CoupleV();
p.X = 10;
p.Y = 20;
CoupleV q=new CoupleV();
q.X = 20;
q.Y = 30;
Console.WriteLine(p.ToString());
Console.WriteLine(q.ToString());
CoupleV[] r = new CoupleV[4];
for (int i = 0; i < r.Length; i++)
r[i].X = r[i].Y=i;
foreach(CoupleV i in r)
Console.WriteLine(i.ToString());
}
25. 25
Operator Overloading
Allows to program type specific operator semantics
More restrictive than C++ overloading mechanism
- always static
- NON virtual (static binding !) !
public static bool operator ==(CoupleV a, CoupleV b)
{
return ((a.x == b.x) && (a.y == b.y));
}
public static Boolean operator !=(CoupleV a, CoupleV b)
{
return !(a == b);
}
// ...
CoupleV p = new CoupleV();p.X = 10;p.Y = 20;
CoupleV q = new CoupleV();q.X = 10;q.Y = 20;
Console.WriteLine(p == q); // TRUE
Console.WriteLine((object)p == (object)q); // FALSE non-virtual !
26. 26
Polymorphism
Java : all methods virtual (late binding) by default
C# (like C++) : methods MUST be declared virtual if late binding applies
class A
{
public virtual void f() {Console.WriteLine("A.f()");}
}
class B : A
{
public override void f() {Console.WriteLine("B.f()");}
}
- shows intention of programmer
- more efficient
- can prevent later extensions ...
- explicit interface implementation
(solving name conflicts in case of multiple interface implementation)
- possibility to hide base class type/method in derived class
27. 27
Assemblies
Type boundaries
- class
- namespace (equivalent to Java package)
- assembly (equivalent to Java archive)
Assemby = exe/dll to deploy
- meta-data (files contained, security settings, versioning info,
dependencies)
- modules (compiled source files)
- resources
Versioning
- contained in assemby info
- allows to run multiple versions of same types on same CLR
28. 28
Visibility
private
same as Java
= default for interface and enum members
public
same as Java
=default for struct and class members
protected
visible in type itself or derived types
internal
visible in assembly
= default for non-nested types
internal protected
visible from type itself, in same assembly and in derived
types (= private or protected or internal)
Type can not be more accessible then types used for its declaration
29. 29
Parameter modifiers
Passing references
ref
pass reference to method
requires parameter is assigned definite value before method entry
out
requires definite parameter assignment before returning from
method call
Variable number of arguments
params
can be applied to last argument of method
Parameter modifiers are part of method signature
30. 30
Parameter modifiers
static void swap(ref int a, ref int b)
{
int t = a; a = b; b = t;
}
static void OneMore(int i, out int j)
{
j = i + 1;
}
static int sum(params int[] x)
{
int r = 0;
foreach (int i in x) r += i;
return r;
}
// ...
int x = 1, y = 2;
swap(ref x, ref y);
Console.WriteLine("{0} - {1}",x, y); // 2 - 1
OneMore(x, out y);
Console.WriteLine("{0} - {1}", x, y); // 2 - 3
Console.WriteLine(sum(1, 2, 3)); // 6
Console.WriteLine(sum(3, 4, 5, 6)); // 18
31. 31
Attributes
Allow to extend language built-in declarative constructs
- Pre-defined attributes (e.g. Serialized)
- Custom attributes
Can be applied to
- class
- method
- field
- parameter
Attributes and values can be retrieved at runtime
32. 32
Field modifiers
const
- value calculated at compile time
- equivalent to Java final
readonly
- value calculated at runtime
- can only be assigned once !
- allows to retrieve setting
(“a not so constant constant ...”)
33. 33
Pointer arithmetic
allowed in sections marked as unsafe
pointer type : <type>*
dereferencing : *<pointer expression>
address calculation : &<variable>
Garbage collector should NOT move around objects
used in unsafe regions
MUST be declared fixed
34. 34
Pointer arithmetic
unsafe static void AdditionOne(int[] b)
{
int l=b.Length;
fixed (int* a = b)
{
int* p = a;
for (int i = 0; i < l; i++,p++) *p = (*p) + 1;
}
}
//...
int[] k ={ 1, 2, 3, 4 };
foreach (int a in k) Console.WriteLine("{0}", a); // 1 2 3 4
AdditionOne(k);
foreach (int a in k) Console.WriteLine("{0}", a); // 2 3 4 5
36. 36
Constructors - Destructors
Very similar to Java constructors – finalizers
Constructor :
can contain explicit constructor call
specified outside constructor body
- call to other constructor of same type : this(...)
- call to base class constructor : base(...)
Destructor
NOT for value type
NO explicit calls to destructor
C++-like syntax (actually expands to calling Finalize)
class A
{
public A():this(1){}
public A(int i):base(i){}
~A() {/* Destructor */}
}
37. 37
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
38. 38
C# type system
Value types (struct, enum)
Reference types (class, array, delegate, interface)
Pointer type
struct CoupleV
{
private int x, y;
public CoupleV(int xx, int yy) { x = xx; y = yy; }
public int X
{
set { x = value; }
get { return x; }
}
public int Y
{
set { y = value; }
get { return y; }
}
public override string ToString()
{
return "(" + x + "," + y + ")";
}
}
39. 39
C# type system
class CoupleR
{
private int x=0, y=0;
public CoupleR(int xx, int yy) { x = xx; y = yy; }
public int X
{
set { x = value; }
get { return x; }
}
public int Y
{
set { y = value; }
get { return y; }
}
public override string ToString()
{
return "(" + x + "," + y + ")";
}
}
40. 40
C# type system
// ...
CoupleR a = new CoupleR(1, 2);
CoupleR b = a;
CoupleV c = new CoupleV(3, 4);
CoupleV d = c;
a.X = 7;
c.X = 7;
Console.WriteLine(a); // (7,2)
Console.WriteLine(b); // (7,2)
Console.WriteLine(c); // (7,4)
Console.WriteLine(d); // (3,4)
41. 41
Type unification
all struct and class types derive from object
(pointer types do not ...)
“simple” (“primitive”) types are actually structs
int : alias for System.Int32
long : alias for System.Int64
...
boxing – unboxing
- value type -> reference type : copy made (automatic)
- reference type -> value type : explicit cast necessary
int x=12;
object o=x; // box
int y=(int)o; // unbox through downcast
42. 42
Available types
Value types
signed integer : sbyte, short, int, long
unsigned integer : byte, ushort, uint, ulong
floating point : float, decimal, double
logical : bool
characters : char
Reference types
object
string
standard notations for constants apply (U : unsigned, L : long)
standard rules for conversions apply
43. 43
Checked Arithmetic
checked(<expression>)
checked {/* block */}
checks for integral overflows
generates runtime exception OverflowException
unchecked(<expression>)
unchecked{/* block */}
turns off compile time bounds checking
44. 44
Control flow statements
Same as in Java, BUT
switch :
no “fall through” behaviour
each case must end with jump (break, goto, ...)
foreach
goto label;
// ...
int x=0;
loop :
x++;
if(x<5) goto loop;
45. 45
Namespaces
Similar to java packages w.r.t. avoiding name clashes
BUT : no boundary for accessibility
Can be nested
namespace A {
namespace B {
class CL {
}
}
}
// ...
A.B.CL x=new A.B.CL();
Alternative
using A.B;
CL x=new CL();
Global namespace = default surrounding namespace
46. 46
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
48. 48
Modifiers
Accessibility (visibility) : private, internal, protected, public
Inheritable
sealed : can not be overridden/inherited (Java equivalent : final)
- sealed class
- sealed method
abstract : MUST be overridden/inherited
- abstract class
- abstract method
class/method can not be sealed AND abstract
Parameter modifiers : ref,out,params
Class member/instance member : static
Late binding/static binding : virtual, override, new
Dangerous ? : unsafe
- unsafe class
- unsafe method
- unsafe property
49. 49
Inheritance
class A {}
class B : A {}
class C : B {}
class D : A {}
Runtime type checking (RTTI)
operator is
if(a is A) {/* ... */}
if(b is A) {/* ... */} // true if b is A or B
Conversions :
- widening conversions (upcast) : automatic
B b = new B();
C c = new C();
D d = new D();
A ab = b;
A ac = c;
B bc = c;
B bd = d; // compile time error
A ad = d;
- narrowing (cntd.)
50. 50
Inheritance
- narrowing conversions : cast necessary
- simple downcast :
B ba=(B)ab; // OK
C ca=(C)ac; // OK
D da=(D)ad; //OK
D dc=(D)ac; // runtime error
- safe downcast (evaluates to null if unsuccesful)
B ba = ab as B;
C ca = ac as C;
D dc = ac as D; // null
51. 51
Polymorphism
Key idea : late binding, based on dynamic object type
C# : use virtual methods, override in derived class
class A
{
public virtual void f() {Console.WriteLine("A.f()");}
}
class B : A
{
public override void f() {Console.WriteLine("B.f()");}
}
class C : B
{
public override void f() { Console.WriteLine("C.f()"); }
}
class D : A
{
public override void f() {Console.WriteLine("D.f()");}
}
52. 52
Polymorphism
A a = new A();
B b = new B();
C c = new C();
D d = new D();
a.f(); // A.f()
b.f(); // B.f()
c.f(); // C.f()
d.f(); // D.f()
A[] a = new A[] { new A(), new B(), new C(), new D() };
foreach(A aa in a) aa.f();
// A.f()
// B.f()
// C.f()
// D.f()
53. 53
Polymorphism
Sealing
class A
{
public virtual void f() {Console.WriteLine("A.f()");}
}
class B : A
{
public sealed override void f() {Console.WriteLine("B.f()");}
}
class C : B
{
public override void f() { Console.WriteLine("C.f()"); }
}
NOT allowed
54. 54
Polymorphism
Hiding base class member : new
class A
{public virtual void f() {Console.WriteLine("A.f()");}}
class B : A
{public override void f() {Console.WriteLine("B.f()");}}
class C : B
{public new void f() { Console.WriteLine("C.f()"); }}
class D : A
{public override void f() {Console.WriteLine("D.f()");}}
A aa = new A(); aa.f(); // A.f()
B bb = new B(); bb.f(); // B.f()
C cc = new C(); cc.f(); // C.f()
D dd = new D(); dd.f(); // D.f()
A ab = new B(); ab.f(); // B.f()
A ac = new C(); ac.f(); // B.f()
A ad = new D(); ad.f(); // D.f();
B bc = new C(); bc.f(); // B.f();
A[] a = new A[] { new A(), new B(), new C(), new D() };
foreach(A o in a) o.f(); // A.f() B.f() B.f() D.f()
55. 55
Polymorphism
Hiding base class member : new
class A
{public virtual void f() {Console.WriteLine("A.f()");}}
class B : A
{public override void f() {Console.WriteLine("B.f()");}}
class C : B
{public new void f() { Console.WriteLine("C.f()"); }}
class D : A
{public new void f() {Console.WriteLine("D.f()");}}
A aa = new A(); aa.f(); // A.f()
B bb = new B(); bb.f(); // B.f()
C cc = new C(); cc.f(); // C.f()
D dd = new D(); dd.f(); // D.f()
A ab = new B(); ab.f(); // B.f()
A ac = new C(); ac.f(); // B.f()
A ad = new D(); ad.f(); // A.f();
B bc = new C(); bc.f(); // B.f();
A[] a = new A[] { new A(), new B(), new C(), new D() };
foreach(A o in a) o.f(); // A.f() B.f() B.f() A.f()
56. 56
Polymorphism
new
- define method as new (even if method with
same signature, possibly sealed, exists in base class)
- define new property
- define new field
class A
{protected double i;
public double I
{set{i = value;}
get{return i;}
}
public sealed void f() {Console.WriteLine("A.f()");}
}
class B : A
{private new int i;
public new int I
{set{i = value;}
get{return i;}
}
public new void f() {Console.WriteLine(“B.f()");}
}
57. 57
Structs
Struct = class except for
• value type, allocated on the stack
• is implicitely sealed (inherit from single type, System.ValueType),
can implement several interfaces
• can NOT have destructor
• NO field initializers (initialization to 0)
• NO constructor that leaves fields uninitialized
struct CoupleV : A // not allowed unless A is interface
{
private int x=1, y=1; // NOT allowed : field initializer
public CoupleV(int xx) { x = xx; }
// NOT allowed : partial initialization
public CoupleV(int xx, int yy) { x = xx; y = yy; } // allowed
}
58. 58
Interfaces
Interface = class except for
• no implementation, (pure abstract class)
• can be supertype of struct (class can not !)
Interface members :
- methods
- properties
- indexers
- events
always : implicitly public, abstract, virtual and non static
59. 59
Interfaces
interface IP{void f();}
interface IQ{void g();}
class A : IP{
public virtual void f() {Console.WriteLine("A.f()");}
}
class B : A,IQ {
public override void f() {Console.WriteLine("B.f()");}
public virtual void g() {Console.WriteLine("B.g()");}
}
class C : B {
public override void f() { Console.WriteLine("C.f()"); }
public override void g() { Console.WriteLine("C.g()"); }
}
class D : A{
public override void f(){Console.WriteLine("D.f()");}
}
class E : D,IQ {
public override void f() { Console.WriteLine("E.f()"); }
public virtual void g() { Console.WriteLine("E.g()"); }
}
60. 60
Interfaces
IP[] p = new IP[] { new A(), new B(), new C(), new D(), new E() };
IQ[] q = new IQ[] { new B(), new C(), new E() };
foreach (IP pp in p) pp.f();
foreach (IQ qq in q) qq.g();
// A.f()
// B.f()
// C.f()
// D.f()
// E.f()
// B.g()
// C.g()
// E.g()
Extending an interface
interface IPP : IP {
void ff();
}
61. 61
Explicit interface
implementation
PROBLEM : implement two interfaces with name collision
-> explicit (instead of implicit) interface implementation
interface U
{
void a();
}
interface V
{
void a();
}
class O : U, V
{
void U.a() { Console.WriteLine("A.ua()"); }
void V.a() { Console.WriteLine("A.va()"); }
}
// ...
O o = new O();
// o.a(); // NOT allowed
((U)o).a(); // A.ua()
((V)o).a(); // A.va()
62. 62
Explicit interface
implementation
LIMITATIONS (compared to implicit implementations)
• NO late binding
no polymorphism related modifiers
(no abstract, virtual, override, new)
• NO access modifier
usage requires cast to interface
access modifier mentioned there is used implicitely
Same rules (as with classes) to
• convert between types
• to convert to structs
63. 63
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
5. Operator Overloading
6. Event driven programming
7. .NET Framework Class Library
8. A GUI in C#
9. A web service in C#
64. 64
Operator overloading
Idea
• treat operators (+,-,*,/,%,...) as special functions
(keyword operator)
• give special meaning to operator according to class
semantics
• allows elegant programming for math-oriented
software
• important issue : what happens in case of mixed type
expressions ?
-> need to overload also type conversion
-> quite complex to keep consistent
-> not available in Java (but proposals are on the way ...)
65. 65
C# Operator overloading
Operators to overload
+ - ! ~ ++ -- (unary)
(binary)
+ - * / % arithmetic
& | ^ bit logic
<< >> bit shift
== != > < >= <= relational
CAN NOT BE OVERLOADED :
- address related operators (unary *, &)
- assignment ! (cf. C++ ...)
ONLY static operators allowed
LOGIC pairs (MUST be overloaded together)
== and !=
< and >
<= and >=
66. 66
Indirect overloading
To keep things consistent
(developer might forget to overload ...)
- && and || are evaluated using & and |
- [] operator overloaded through indexers
- combined assignment operators (+=, -=, *=, /=, ...)
evaluated using non-combined counterparts
67. 67
Value equality
Operators == and != default to reference equality
If other behavior is needed :
- override Equals method (cf. Java)
- redirect Equals to “==“ and “!=“
-> allows compatibility with .NET languages
NOT supporting operator overloading
-> allows polymorphism
68. 68
Value equality
class Point
{
protected int x, y;
public Point(int xx, int yy) { x = xx; y = yy; }
public Point(int xx) : this(xx, xx) { }
public Point() : this(0) { }
public override string ToString()
{
return "<"+x+","+y+">";
}
public static bool operator ==(Point a, Point b)
{
return (a.x == b.x) && (a.y == b.y);
}
public static bool operator !=(Point a, Point b)
{
return !(a == b);
}
}
69. 69
Value equalityProblem
Collections framework heavily uses Equals()-method
(implementation of no-duplicate collections such as Sets)
-> whenever == and != overloaded -> Equals() should be overridden
public override bool Equals(object o)
{
if (o is Point)
{
Point p = (Point)o;
return this == p;
}
else return false;
}
DO NOT call Equals() from within == and != ...
70. 70
Value equality :
inheritance
class Point3D : Point
{
protected int z;
public Point3D(int xx,int yy,int zz):base(xx,yy){z=zz;}
public override string ToString()
{
return "<"+x+","+y+","+z+">";
}
}
// ...
Point a=new Point(1,1);
Point b=new Point(2,2);
Point c = new Point(2, 2);
Point3D d=new Point3D(3,3,3);
Point3D e = new Point3D(3, 3, 3);
Point3D f = new Point3D(3, 3, 4);
Console.WriteLine(a); // <1,1>
Console.WriteLine(b); // <2,2>
Console.WriteLine(e); // <3,3,3>
Console.WriteLine(f); // <3,3,4>
71. 71
Value equality :
inheritance
Console.WriteLine(a == b); // False
Console.WriteLine(a == c); // False
Console.WriteLine(a == d); // False
Console.WriteLine(b == c); // True -> value !
Console.WriteLine(b == d); // False
Console.WriteLine(c == d); // False
Console.WriteLine(d == e); // True
Console.WriteLine(e == f); // True
Operators == and != should be overloaded in Point3D
public static bool operator ==(Point3D a, Point3D b)
{
return (a.x == b.x) && (a.y == b.y)&&(a.z==b.z);
}
public static bool operator !=(Point3D a, Point3D b)
{
return !(a == b);
}
// ...
Console.WriteLine(e == f); // False
72. 72
Value equality :
polymorphismPoint[] p ={ new Point(1, 1), new Point(2, 2),
new Point3D(1, 1, 1), new Point3D(2, 2, 2) };
Point s1 = new Point(2, 2)
Point s2 = new Point3D(2, 2, 2);
foreach (Point pp in p) Console.WriteLine(pp == s1);
foreach (Point pp in p) Console.WriteLine(pp == s2);
// False True False True
// False True False True
CHANGE operator in base class (!)
public static bool operator ==(Point a, Point b)
{
if(((a is Point3D)&&!(b is Point3D))||
(!(a is Point3D)&&(b is Point3D))) return false;
else return (a.x == b.x) && (a.y == b.y);
}
public static bool operator !=(Point a, Point b)
{
return !(a == b);
}
// False True False False
// False False False True
73. 73
Overloading arithmetic
operators
Operator + Point p: translate over p
Operator + int i: translate over Point(i,i)
public static Point operator +(Point a, Point b){
return new Point(a.x + b.x,a.y + b.y);
}
public static Point operator +(Point a,int i){
return new Point(a.x + i, a.y + i);
}
public static Point operator +(int i, Point a){
return a + i;
}
//...
Point a = new Point(10, 20);
Point b = new Point(20, 30);
Console.WriteLine(a + b); //<30,50>
Console.WriteLine(a + 100); //<110,120>
Console.WriteLine(100 + a + b); //<130,150>
74. 74
Type Conversion
Two versions
implicit
not dangerous, can be invoked by compiler
whenever needed
explicit
dangerous, only done if explicitely asked
e.g. conversion to and from int
Point-to-int : max value of x and y (looses info !)
int-to-Point : Point on diagonal (no info lost !)
75. 75
Type Conversion
public static Point operator +(Point a,int i)
{
Console.WriteLine("+(P,i)");
return new Point(a.x + i, a.y + i);
}
public static Point operator +(int i, Point a)
{
Console.WriteLine("+(i,P)");
return a + i;
}
public static implicit operator Point(int i)
{
Console.WriteLine("(P)i");
return new Point(i, i);
}
public static explicit operator int(Point p)
{
Console.WriteLine("(i)P");
return (p.x > p.y) ? p.x : p.y;
}
76. 76
Type Conversion
Point a = new Point(10,20);
Console.WriteLine((Point)5); // (P)i <5,5>
Console.WriteLine(a + 5); // +(P,i) <15,25>
Console.WriteLine((int)a + 5); //(i)P 25
In case NO +(Point,int) and +(int,Point) operators :
Console.WriteLine((Point)5); // (P)i <5,5>
Console.WriteLine(a + 5); // (P)i <15,25>
Console.WriteLine((int)a + 5); // (i)P 25
77. 77
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
5. Operator Overloading
6. Event driven programming
• delegates
• events
7. .NET Framework Class Library
8. A GUI in C#
9. A web service in C
78. 78
Delegates[<attributes>][unsafe][<access modifiers>]
[new]delegate <return type> <delegate name>
(<parameter list>);
= type defining method signature
- instance can hold (list of) method(s) with matching signature
public delegate bool Filter(string s);
class Del{
public static void Main(){
String[] r = new String[] { "a fair Lady",
"the king and I", "hye buzz", "a beautiful mind",
"the zzz" };
Filter f=new Filter(StartWithA);
ArrayList a=Show(r,f);
Console.WriteLine("Starting with a :");
foreach (String s in a) Console.WriteLine(s);
f=new Filter(EndWithZ);
ArrayList z = Show(r, f);
Console.WriteLine("Ending with z :");
foreach (String s in z) Console.WriteLine(s);
}
//...
}
79. 79
Delegatesclass Del
{
// ...
public static bool StartWithA(String s)
{
return s[0] == 'a';
}
public static bool EndWithZ(String s)
{
return s[s.Length-1] == 'z';
}
public static ArrayList Show(String[] s, Filter f)
{
ArrayList l = new ArrayList();
foreach(String i in s) if(f(i)) l.Add(i);
return l;
}
}
Starting with a :
a fair Lady
a beautiful mind
Ending with z :
hye buzz
the zzz
80. 80
Multicast Delegates
Use operators += and -= to add/remove delegates to other delegate
if non-void : return value of last invocation is returned
public delegate void M(int i);
class Multi
{
// ...
public static void Print(int i)
{
Console.WriteLine("i = {0}",i);
}
public static void Sqrt(int i)
{
Console.WriteLine(Math.Sqrt(i));
}
public static void EndMessage(int i)
{
Console.WriteLine("Ending ...");
}
}
81. 81
Multicast Delegates// public delegate void M(int i);
class Multi
{ // ...
public static void Main()
{
M m = null;
Console.WriteLine("----------------------------");
m += new M(Print);
m += new M(Sqrt);
m += new M(EndMessage);
m(12);
Console.WriteLine("----------------------------");
m += new M(Print);
m(16);
Console.WriteLine("----------------------------");
m -= new M(Sqrt);
m(25);
Console.WriteLine("----------------------------");
m -= new M(Print);
m(36);
Console.WriteLine("----------------------------");
}
}
-----------------
i = 12
3,46410161513775
Ending ...
-----------------
i = 16
4
Ending ...
i = 16
-----------------
i = 25
Ending ...
i = 25
-----------------
i = 36
Ending ...
-----------------
82. 82
Multicast Delegates
From within object -> invoked on this-object
public delegate void F();
public class A
{ public F f;
private int i = 0;
public A(int i) {
this.i = i;
f=null;
f+=new F(Print);
f+=new F(Inc);
f+=new F(Print);
f+=new F(Dec);
f+=new F(Dec);
f+=new F(Print);
}
public void Inc() { i++; }
public void Dec() { i--; }
public void Print() {Console.WriteLine(this);}
public override string ToString(){return "<"+i+">";}
public void IncAndDec() {f();}
83. 83
Multicast Delegates
From within object -> invoked on this-object
// ...
public static void Test() {
A a=new A(10);
a.IncAndDec();
a.f();
}
}
class MultiObj
{
public static void Main()
{
A.Test();
A a = new A(20);
a.f();
}
}
<10>
<11>
<9>
<9>
<10>
<8>
<20>
<21>
<19>
84. 84
Delegate versus ...
Delegate vs. C function pointer
- type safe (unless in unsafe regions ...)
- can hold multiple methods to invoke
- can hold instance to invoke method upon
Delegate vs. Interface
- multiple methods to invoke
(could be implemented through list of
interface objects)
- any problem solved with delegates can be
solved using interface types
- “more elegant”
85. 85
Delegate versus Inteface
interface IF
{
bool Filter(string s);
}
class StartWithAFilter : IF
{
public bool Filter(string s)
{
return s[0] == 'a';
}
}
class EndWithZFilter : IF
{
public bool Filter(string s)
{
return s[s.Length - 1] == 'z';
}
}
86. 86
Delegate versus Inteface
class Test {
public static void Main()
{
String[] r = new String[] { "a very fair Lady",
"the king and a z", "hye buzzy",
"a beautiful mind for z", "the zzz" };
ArrayList a = Show(r, new StartWithAFilter());
Console.WriteLine("Starting with a :");
foreach (String s in a) Console.WriteLine(s);
ArrayList z = Show(r, new EndWithZFilter());
Console.WriteLine("Ending with z :");
foreach (String s in z) Console.WriteLine(s);
}
public static ArrayList Show(String[] s, IF f)
{
ArrayList l = new ArrayList();
foreach (String i in s) if (f.Filter(i)) l.Add(i);
return l;
}
}
Starting with a :
a very fair Lady
a beautiful mind for z
Ending with z :
the king and a z
a beautiful mind for z
the zzz
87. 87
Events
A
B
events
- notification from A -> B
- WITHOUT calling directly method on B
use of intermediary
- event listeners + event handlers
- in C# : implemented through delegates
event
88. 88
Events
A
B
event
Event Source
Event Sink
- delegate defined to fix handler signature
- source class declares ability to fire event
-> public (downcast) multicast delegate d
- delegates registered with d to get notified
- source class fires event by calling delegate d
d
Delegate
delegate
delegate
delegate
89. 89
Events : Example
Customer arrives in business centre
-> generates event
-> interested parties are notified
Delegate conventions for eventing
- first argument : identifies source of event
- second argument : additional info
subclass of EventArgs
Example
- ID = object reference
- additional info :
- time of event
- urgency
90. 90
Events : Example
Delegate signature
delegate void CustomerHandler(object s, CustomerArgs e)
public delegate void CustomerHandler(object o,CustomerArgs e);
enum Priority {LOW=0,NORMAL=1,HIGH=2};
class CustomerArgs : EventArgs
{
private DateTime d;
public Priority p;
public static Random r = new Random();
public DateTime Time
{
get { return d; }
}
public Priority Urgency
{
get {return p;}
}
public CustomerArgs()
{
d = DateTime.Now;
p=(Priority)(r.Next(3));
}
}
Preliminaries
• Delegate declaration
• Definition of event handler argument type
91. 91
Events : Example
public class Customer
{
private string name;
public event CustomerHandler CustomerArrival;
public string Name
{
get { return name; }
}
public Customer(string n){name = n;}
public void arrive()
{
if (CustomerArrival != null)
{
CustomerArgs args = new CustomerArgs();
CustomerArrival(this, args); // fire the event;
}
}
public override string ToString(){return "<Customer : "+name+">";}
}
Event source class : Customer
• Declares event
• Listeners will register to event
• FIRES event when needed
92. 92
Events : Example
class HotelService
{private string n;
public HotelService(string n) {this.n=n;}
public string Name{get{return n;}}
public void CustomerArrivalNotification(object o,CustomerArgs a) {
Console.WriteLine(this + " : guest " + (Customer)o +
" arrived at " + (a.Time)+"(Priority : "+a.Urgency+")");
}
public override string ToString()
{ return "Hotel service : "+n;
}
}
class HotelPersonnel
{private string n;
public HotelPersonnel(string n) {this.n=n;}
public string Name{get{return n;}}
public void CustomerArrivalNotification(object o,CustomerArgs a) {
Console.WriteLine(this + " : guest " + (Customer)o +
" arrived at" + (a.Time) + "(Priority : " + a.Urgency + ")");
}
public override string ToString()
{ return "Hotel personnel : "+n;
}
}
Event sink classes :
• HotelService
• HotelPersonnel
• declare a method conforming
to delegate signature
93. 93
Events : Example
class CustomerApp {
public static void Main() {
Customer[] c=new Customer[] {new Customer("Bart De Poorter"),
new Customer("George Bush"),
new Customer("Condaleeza Rice"),
new Customer("Mahatma Ghandi")};
HotelService[] hs = new HotelService[] {
new HotelService("House keeping"),
new HotelService("Accounting"),
new HotelService("Reception") };
HotelPersonnel[] hp = new HotelPersonnel[] {
new HotelPersonnel("Manager"),
new HotelPersonnel("Mr. BigBoss (owner)") };
foreach(HotelService h in hs)
{
foreach(Customer cu in c)
cu.CustomerArrival+=
new CustomerHandler(h.CustomerArrivalNotification);
}
// ...
Main method
• instantiates simulation objects
• binds sinks to sources
94. 94
Events : Example
// ...
foreach (HotelPersonnel h in hp)
{
c[1].CustomerArrival +=
new CustomerHandler(h.CustomerArrivalNotification);
c[2].CustomerArrival +=
new CustomerHandler(h.CustomerArrivalNotification);
}
Console.WriteLine("Starting simulation ----------------");
foreach (Customer cc in c)
{
cc.arrive();
try
{
System.Threading.Thread.Sleep(1000);
}
catch (System.Threading.ThreadInterruptedException e) { }
Console.WriteLine("---------------------");
}
}
}
95. 95
Events : Example
Starting simulation ----------------
Hotel service : House keeping : guest <Customer : Bart De Poorter> arrived at 14/12/2005 9:57:06(Priority : NORMAL)
Hotel service : Accounting : guest <Customer : Bart De Poorter> arrived at 14/12/2005 9:57:06(Priority : NORMAL)
Hotel service : Reception : guest <Customer : Bart De Poorter> arrived at 14/12/2005 9:57:06(Priority : NORMAL)
---------------------
Hotel service : House keeping : guest <Customer : George Bush> arrived at 14/12/2005 9:57:07(Priority : LOW)
Hotel service : Accounting : guest <Customer : George Bush> arrived at 14/12/2005 9:57:07(Priority : LOW)
Hotel service : Reception : guest <Customer : George Bush> arrived at 14/12/2005 9:57:07(Priority : LOW)
Hotel personnel : Manager : guest <Customer : George Bush> arrived at14/12/2005 9:57:07(Priority : LOW)
Hotel personnel : Mr. BigBoss (owner) : guest <Customer : George Bush> arrived at 14/12/2005 9:57:07(Priority : LOW)
---------------------
Hotel service : House keeping : guest <Customer : Condaleeza Rice> arrived at 14/12/2005 9:57:08(Priority : NORMAL)
Hotel service : Accounting : guest <Customer : Condaleeza Rice> arrived at 14/12/2005 9:57:08(Priority : NORMAL)
Hotel service : Reception : guest <Customer : Condaleeza Rice> arrived at 14/12/2005 9:57:08(Priority : NORMAL)
Hotel personnel : Manager : guest <Customer : Condaleeza Rice> arrived at14/12/2005 9:57:08(Priority : NORMAL)
Hotel personnel : Mr. BigBoss (owner) : guest <Customer : Condaleeza Rice> arrived at14/12/2005 9:57:08(Priority : NORMAL)
---------------------
Hotel service : House keeping : guest <Customer : Mahatma Ghandi> arrived at 14/12/2005 9:57:09(Priority : HIGH)
Hotel service : Accounting : guest <Customer : Mahatma Ghandi> arrived at 14/12/2005 9:57:09(Priority : HIGH)
Hotel service : Reception : guest <Customer : Mahatma Ghandi> arrived at 14/12/2005 9:57:09(Priority : HIGH)
---------------------
96. 96
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
5. Operator Overloading
6. Event driven programming
7. .NET Framework Class Library
8. A GUI in C#
9. A web service in C#
97. 97
FCL
-CLS compliant set of managed type
- accessible from all .NET languages
- grouping (3542 types) :
- logically in namespaces (120)
- deployed as a set of assemblies (36) of .NET framework
System
- collection of core classes (Object, ValueType, Enum, Convert, Exception)
- core interfaces (ICloneable, IComparable, ...)
- time related classes (DateTime, TimeSpan)
- support for
- delegates
- mathematical operations
- custom attributes (Attribute)
- exception handling
- strings (String)
98. 98
FCL
System.Text
- immutable string (System.String)
- mutable string (StringBuilder)
- regular expressions (System.Text.RegularExpressions)
C# string is alias for System.String
overloaded “==“ operator for equality check (NOT in Java !)
indexing strings : use normal indexing mechanism ([])
string a=“abcde”;
char c=a[2];
formatting strings (Format()-method)
format specifier string :
{ParamIndex[,MinWidth][:FormatString]}
e.g. “Value of account {0} is {1:C}” (C -> “Currency”)
99. 99
FCL
System.Collections
- Java-like set of interfaces and classes, implementing popular
data structures (ArrayList, Queue, Stack, BitArray, ...)
- System.Array is base type for all array types
- generics as of .NET v 2.0 (System.Collections.Generics)
to iterate over Collection :
- Collection implements IEnumerable
public interface IEnumerable {
IEnumerator GetEnumerator();
}
- iterator implements IEnumerator
public interface IEnumerator {
bool MoveNext();
object Current {get;}
void Reset();
}
- also : foreach idiom can be used
100. 100
FCL
iterator for Dictionary (Java Map)
public interface IDectionaryEnumerator : IEnumerator {
DictionaryEntry Entry {get;}
object Key {get;}
object Value {get;}
}
IEnumerable
ICollection
IList
IDictionary
get iterator
support for counting
converting to array
indexed collection
101. 101
FCLclass Array : ICollection, IEnumerable, IList
fixed size indexed array
class ArrayList : IList
dynamically sized array
class Hashtable : IDictionary
standard dictionary key/value pairs
hash computed using GetHashCode() method
-> should be overridden
class Queue
FIFO data structure
methods to queue and dequeue
class Stack
LIFO data structure
key methods : push and pop
102. 102
FCL
class Bitarray
compressed form of bool[] (one bit per boolean)
class SortedList : IDictionary
sorted to increase lookup efficiency
(binary search instead of linear search)
class StringCollection : ICollection
special purpose collection for storing strings
class StringDictionary : IEnumerable
idem for storing string maps
103. 103
FCL : Examplespublic static void Print(ICollection c)
{
int j = 0;
foreach(object i in c)
Console.WriteLine("{0} -> {1}",j++,i);
Console.WriteLine("--------------------");
}
ArrayList al = new ArrayList();
al.Add("Wim");
al.Add("Ann");
al.Add("Bram");
al.Add("Bart");
al.Add("Greet");
Print(al);
al.Sort();
Print(al);
Console.WriteLine(al[1]);
al[1] = "BART";
Print(al);
0 -> Wim
1 -> Ann
2 -> Bram
3 -> Bart
4 -> Greet
--------------------
0 -> Ann
1 -> Bart
2 -> Bram
3 -> Greet
4 -> Wim
--------------------
Bart
0 -> Ann
1 -> BART
2 -> Bram
3 -> Greet
4 -> Wim
--------------------
105. 105
FCL : SortingTwo options :
- object ordering implemented in the class itself
public interface IComparable {
int CompareTo(object o);
}
- delegate ordering to special object
public interface IComparer {
int Compare(object o1,object o2);
}
comparing must follow special contract
1. if a comes before b -> a.CompareTo(b)<0
2. if a is equal to b -> a.CompareTo(b) == 0
3. if a comes after b -> a.CompareTo(b)>0
4. null first -> a.CompareTo(null)>0
5. a.CompareTo(b) -> a.GetType() == b.GetType()
106. 106
FCL
System.IO
- standard in, out and error stream
- binary and text file I/O
- registering/notification of filesystem events
- access of user specific secure storage (“Isolated Storage”)
- System.Console
- System.IO.IsolatedStorage
System.Net
- classes for network communication
- raw socket access, TCP, UDP sockets
- HTTP support
- System.Net
- System.Net.Sockets
- System.IO.Stream
108. 108
FCL
System.Reflection
- retrieve type information (methods, class names, signatures, ...)
at runtime
- retrieve (custom) attributes at runtime
-> for each custom attribute :
- CLR creates object
- retrieved using reflection interface
- retrieve metadata at runtime
- assembly info (version, target OS, ...)
- data to create custom attributes stored as metadata
109. 109
FCL
System.Runtime.Serialization
- write object graph to/from stream (file or network)
- default serializers : XML and binary
- serializability : use non-custom attribute [Serializable]
- System.SerializableAttribute
- System.NonSerializableAttribute
System.Runtime.Remoting
- distributed object model of .NET
- calls can be : synchronous, asynchronous, one-way
- transport protocol : TCP, HTTP or SMTP
- format : binary or SOAP
- naming service, activation service, marshalling, messaging
110. 110
FCL
System.Web.Services
- in fact part of ASP.NET (not part of CLR)
- describe, discover and publish web services
System.Data
- known as ADO.NET
- classes to support database access
System.Xml
- schemas, namespaces, parsing (DOM,SAX)
- implementation of XSLT, XPath, SOAP1.1
111. 111
FCL
System.Drawing
- support for graphics
- known as GDI+
- brushes, fonts, bitmaps, rendering, drawing primitives, ...
System.Windows.Forms
- Rich client applications (“classic GUIs”)
- known as “Windows Forms”
- forms package, GUI components and RAD component model
System.Web
- Thin client applications
- known as “Web Forms”
- server side package creates HTML UI
- support for session management (state), security, deployment, ...
- part of ASP.NET
112. 112
FCL
System.Globalization
- date/time conversions
- string adaptation to locale
- resource file to centralize locale data
System.Configuration
- per user, per application configuration management
System.EnterpriseServices
- advanced services
- distributed transaction, object pooling, queuing, event handling
- reliable asynchronous messaging
- access to directory service
113. 113
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
5. Operator Overloading
6. Event driven programming
7. .NET Framework Class Library
8. A GUI in C#
9. A web service in C#
114. 114
GUIs in .NET
- heavily uses delegates
- event subscription
- event notification
- Visual Studio .NET contains IDE to assist GUI development
- choose New Project -> “Windows Application”
(instead of “Console Application”)
- Add WinForms as needed
- Drop components from ToolBox on each form
- Change component state in IDE generated code
- Code event handlers
115. 115
Example : incrementor
System.Windows.Forms.Button
declares properties : Name, Text
fires events :
System.EventHandler Click
System.Windows.Forms.TextBox
declares properties : Name, Text
System.Windows.Forms.Form
declares properties :
Name, Text
Controls (container)
fires events :
System.EventHandler Load
116. 116
Example : incrementor
Main()-method
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace WindowsApplication1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
IDE-generated
[Program.cs]
117. 117
Example : incrementor
Form1-class
namespace WindowsApplication1
{
partial class Form1 {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources
/// should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
IDE-generated
(edited)
[Form1.Designer.cs]
118. 118
Example : incrementor
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(92, 150);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Click here";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
IDE-generated
(edited)
[Form1.Designer.cs]
Form1-class
119. 119
Example : incrementor
Form1-class
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(78, 103);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 1;
this.textBox1.TextChanged +=
new System.EventHandler(this.textBox1_TextChanged);
IDE-generated
(edited)
[Form1.Designer.cs]
121. 121
Example : incrementor
namespace WindowsApplication1
{ public partial class Form1 : Form
{
int i = 0;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e){}
private void button1_Click(object sender, EventArgs e)
{
i++;
textBox1.Text = ""+i;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}
template IDE-generated
handler code to add !
[Form1.cs]
Form1-class
122. 122
C# and .NET
1. Introduction
2. C# versus Java : highlights
3. C# data types
4. Defining custom data types
5. Operator Overloading
6. Event driven programming
7. .NET Framework Class Library
8. A GUI in C#
9. A web service in C#
123. 123
.NET / C# web service
- actually part of ASP.NET
- uses .asmx file to bind server to code
- C# :
- web service derives from System.Web.Services.WebService
- class must be public, must have public constructor
- has [WebService] attribute
paramters :
- Description : info
- Name : default = class name
- Namespace : XML-namespace
- every exposed service method should have attribute
[WebMethod]
parameters include :
-Description : info
-EnableSession : default = false
- MessageName : default = method name
124. 124
.NET / C# web service
web server
- runs .asmx -file
- locates class files referred
- loads, runs and manages code
client
- statically retrieves WSDL document
- generates and compiles proxy class
- instantiates service proxy
- call methods on the proxy
125. 125
Hello Service
Server side
Create ASP.NET Web Service project
File -> New -> Web Site
ASP.NET Web Service template
Edit [WebService] attribute (if necessary)
Add class logic, give any WS method [WebMethod] attribute
Build project
Run Project
Check if service is running (WSDL-file)
http://localhost:1665/WebSite1/?.asmx ? WSDL
Invoke method from browser to check proper functioning
127. 127
Hello Service
Service.cs
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld(string e) {
return "Hello World there, "+e;
}
}
129. 129
Hello ServiceService invocation from browser
(http://localhost:1655/WebSite1/Service.asmx?op=HelloWorld)
Answer :
<string>Hello World there, MyName</string>
130. 130
Hello Service
Client side
Create Windows Console project (or GUI project ...)
Open WS project and add to current solution
Add Web Reference
-> Browse local host
-> Select Web Reference (= namespace for proxy)
(Here : HelloService)
Add client code
-> instantiate proxy object
-> call WS methods on proxy
131. 131
Hello Service
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
HelloService.Service s = new HelloService.Service();
Console.WriteLine(" -> " + s.HelloWorld("Georgie "));
}
}
}
-> Hello World there, Georgie
Press any key to continue . . .