SlideShare a Scribd company logo
1 of 5
Платформата Microsoft .NET и
езикът на програмиране C#
XML в C#
XML писане
using (XmlWriter writer = XmlWriter.Create("employees.xml")) {
writer.WriteStartDocument();
writer.WriteStartElement("Employees");
writer.WriteStartElement("Employee");
writer.WriteElementString("Name", “Ivan");
writer.WriteElementString("Salary", “1234");
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndDocument();
}
XML четене
using (XmlReader reader = XmlReader.Create("perls.xml")){
while (reader.Read()){
if (reader.IsStartElement()){
switch (reader.Name) {
case "Employees":
Console.WriteLine("Start <Employees> element.");
break;
case "Employee":
Console.WriteLine("Start <Employee> element.");
if (reader.Read())
{
Console.WriteLine(" Text node: " + reader.Value);
}
break;
}}}}
Пращане на данни по мрежата
 https://msdn.microsoft.com/en-
us/library/system.net.sockets.tcplistener(v=vs.110).aspx
 https://msdn.microsoft.com/en-
us/library/system.net.sockets.tcpclient(v=vs.110).aspx

More Related Content

What's hot

What's hot (14)

Java script programs
Java script programsJava script programs
Java script programs
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
Human Talks - StencilJS
Human Talks - StencilJSHuman Talks - StencilJS
Human Talks - StencilJS
 
Node js crash course session 2
Node js crash course   session 2Node js crash course   session 2
Node js crash course session 2
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Javascript - Beyond-jQuery
Javascript - Beyond-jQueryJavascript - Beyond-jQuery
Javascript - Beyond-jQuery
 
Jsp intro
Jsp introJsp intro
Jsp intro
 
AngularJS Compile Process
AngularJS Compile ProcessAngularJS Compile Process
AngularJS Compile Process
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Php
PhpPhp
Php
 

Viewers also liked (19)

.NET/C#_2
.NET/C#_2.NET/C#_2
.NET/C#_2
 
.NET/C#_1
.NET/C#_1.NET/C#_1
.NET/C#_1
 
.NET/C#_8
.NET/C#_8.NET/C#_8
.NET/C#_8
 
.NET/C#_17
.NET/C#_17.NET/C#_17
.NET/C#_17
 
.NET/C#_3
.NET/C#_3.NET/C#_3
.NET/C#_3
 
.NET/C#_9
.NET/C#_9.NET/C#_9
.NET/C#_9
 
.NET/C#_13
.NET/C#_13.NET/C#_13
.NET/C#_13
 
.NET/C#_7
.NET/C#_7.NET/C#_7
.NET/C#_7
 
.NET/C#_18
.NET/C#_18.NET/C#_18
.NET/C#_18
 
.NET/C#_12
.NET/C#_12.NET/C#_12
.NET/C#_12
 
.NET/C#_15
.NET/C#_15.NET/C#_15
.NET/C#_15
 
.NET/C#_16
.NET/C#_16.NET/C#_16
.NET/C#_16
 
.NET/C#_20
.NET/C#_20.NET/C#_20
.NET/C#_20
 
.NET/C#_11
.NET/C#_11.NET/C#_11
.NET/C#_11
 
.NET/C#_10
.NET/C#_10.NET/C#_10
.NET/C#_10
 
.NET/C#_6
.NET/C#_6.NET/C#_6
.NET/C#_6
 
.NET/C#_14
.NET/C#_14.NET/C#_14
.NET/C#_14
 
.NET/C#_4
.NET/C#_4.NET/C#_4
.NET/C#_4
 
.NET/C#_5
.NET/C#_5.NET/C#_5
.NET/C#_5
 

Similar to .NET/C#_19

10. session 10 loops and arrays
10. session 10   loops and arrays10. session 10   loops and arrays
10. session 10 loops and arrays
Phúc Đỗ
 
Java script
 Java script Java script
Java script
bosybosy
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
Zohar Arad
 

Similar to .NET/C#_19 (20)

Introduction of javascript
Introduction of javascriptIntroduction of javascript
Introduction of javascript
 
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
 
Play framework training by Neelkanth Sachdeva @ Scala Traits Event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala Traits Event , New Delh...Play framework training by Neelkanth Sachdeva @ Scala Traits Event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala Traits Event , New Delh...
 
10. session 10 loops and arrays
10. session 10   loops and arrays10. session 10   loops and arrays
10. session 10 loops and arrays
 
Week 12 code
Week 12 codeWeek 12 code
Week 12 code
 
Angular JS2 Training Session #1
Angular JS2 Training Session #1Angular JS2 Training Session #1
Angular JS2 Training Session #1
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction Training
 
Java script
 Java script Java script
Java script
 
Apache Utilities At Work V5
Apache Utilities At Work   V5Apache Utilities At Work   V5
Apache Utilities At Work V5
 
Javascript
JavascriptJavascript
Javascript
 
JavaScript lesson 1.pptx
JavaScript lesson 1.pptxJavaScript lesson 1.pptx
JavaScript lesson 1.pptx
 
JSONSchema with golang
JSONSchema with golangJSONSchema with golang
JSONSchema with golang
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic LabsTypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
 
UNIT 1 (7).pptx
UNIT 1 (7).pptxUNIT 1 (7).pptx
UNIT 1 (7).pptx
 
Type script - advanced usage and practices
Type script  - advanced usage and practicesType script  - advanced usage and practices
Type script - advanced usage and practices
 
Closure
ClosureClosure
Closure
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
2310 b 12
2310 b 122310 b 12
2310 b 12
 
Implementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDBImplementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDB
 
Deep Dumpster Diving
Deep Dumpster DivingDeep Dumpster Diving
Deep Dumpster Diving
 

More from RaynaITSTEP

More from RaynaITSTEP (20)

Project management professional
Project management professionalProject management professional
Project management professional
 
Project management it step
Project management it stepProject management it step
Project management it step
 
Lean startup
Lean startupLean startup
Lean startup
 
РАБОТА С ОБЕКТА „ЗАЯВКА“ (2)
РАБОТА С ОБЕКТА „ЗАЯВКА“ (2)РАБОТА С ОБЕКТА „ЗАЯВКА“ (2)
РАБОТА С ОБЕКТА „ЗАЯВКА“ (2)
 
DBT_3
DBT_3DBT_3
DBT_3
 
DBT_2
DBT_2DBT_2
DBT_2
 
DBT_1
DBT_1DBT_1
DBT_1
 
monitoring and diagnostics
monitoring and diagnosticsmonitoring and diagnostics
monitoring and diagnostics
 
network security
network securitynetwork security
network security
 
networking
networkingnetworking
networking
 
data security
data securitydata security
data security
 
configuring disk sand drivers
configuring disk sand driversconfiguring disk sand drivers
configuring disk sand drivers
 
boot process
boot process  boot process
boot process
 
install update and migration to windows 10
install update and migration to windows 10install update and migration to windows 10
install update and migration to windows 10
 
virtualization
virtualizationvirtualization
virtualization
 
Фотошоп за деца_4
Фотошоп за деца_4Фотошоп за деца_4
Фотошоп за деца_4
 
Структурни кабелни системи
Структурни кабелни системиСтруктурни кабелни системи
Структурни кабелни системи
 
Android introduction
Android introductionAndroid introduction
Android introduction
 
Adobe Illustrator - Урок 2
Adobe Illustrator - Урок 2Adobe Illustrator - Урок 2
Adobe Illustrator - Урок 2
 
Adobe Illustrator - Обобщение
Adobe Illustrator - ОбобщениеAdobe Illustrator - Обобщение
Adobe Illustrator - Обобщение
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 

.NET/C#_19

  • 1. Платформата Microsoft .NET и езикът на програмиране C#
  • 3. XML писане using (XmlWriter writer = XmlWriter.Create("employees.xml")) { writer.WriteStartDocument(); writer.WriteStartElement("Employees"); writer.WriteStartElement("Employee"); writer.WriteElementString("Name", “Ivan"); writer.WriteElementString("Salary", “1234"); writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndDocument(); }
  • 4. XML четене using (XmlReader reader = XmlReader.Create("perls.xml")){ while (reader.Read()){ if (reader.IsStartElement()){ switch (reader.Name) { case "Employees": Console.WriteLine("Start <Employees> element."); break; case "Employee": Console.WriteLine("Start <Employee> element."); if (reader.Read()) { Console.WriteLine(" Text node: " + reader.Value); } break; }}}}
  • 5. Пращане на данни по мрежата  https://msdn.microsoft.com/en- us/library/system.net.sockets.tcplistener(v=vs.110).aspx  https://msdn.microsoft.com/en- us/library/system.net.sockets.tcpclient(v=vs.110).aspx