国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

??
C# ??? ??? ??
C# ??? ??
1. ???? ???
2. SOAP ???
3. XML ???
4. ??? ?? ???
?

C# ???

Sep 03, 2024 pm 03:30 PM
c# c# tutorial

?? ????? C# ???? ?? ??? ?????. ?? ????? ??? ????? ???? ??? ???(serialization)?? ?? ?? ????? ??? ?? ??? ????? ???? ??? ????? ?? ??? ? ?? ??? ??? ????? ?????. ?? ??? ??? ???? ??? ????? ???? ???? ?? ?? ????? ?? ????, ??? ??? ???? ?? ?? ??? ?? ??? ?? ??? ???? ??? ???? ????? ?? ???? ???? ?????. ??? ???????.

C# ??? ??? ??

??? C# ??? ??? ?????.

  • ??? ??? ?????.
  • BinaryFormatter ??? ?????.
  • Serialize( ) ???? ?????.

C# ??? ??

  • ???????? ??? ??? ??? ???? ??? ??? ? ??? ?????? ????? ??? ???? ???? ???. ?? ??? ??? ???? ??? ? ????.
  • ??? ????? ??? ????? ???? ??? ??? ??? ???? ??????? ??? ??? ????? ???.
  • ???? ???? ????? ?? ??? ??? ????? ????? ???? ??????.
  • ???? ???? ??? ???? ??? ?? ????.
  • C#?? ???? ????? ????? Runtime.Serialization ??????? ???? ??? ???.
  • [ ??? ?? ] ??? C#?? ???? ??? ???? ??? ? ?????.

[ ??? ?? ] ???? ???? ?? ???:

??:

[Serializable]
public class Check
{
public int code;
public string name;
}
  • ????? ???? ??? ???? ? ?? ??? ??? [ NonSerialized() ] ??? ??? ? ????.

[ NonSerialized() ] ??? ???? ?? ?? ?? ???? ?????.

??:

[Serializable]
public class Check
{
public int code;
public string name;
[NonSerialized()]
Public double price;
}
  • C#??? ??? ?? ??? ??? ?????.

??? C#?? ???? ??? ?????.

1. ???? ???

  • ?? ??? ?? ? ?? ?? ?? ???? ??????.
  • ???? ???? ???? ??? ???? ????? ???? ? ????.
  • ??? ???? ???? ???? ?? ????? ????? ?? ??? ID? ?????.
  • ???. ?? ??. Serilaization. ???. ???? ???? ????? ????? ???? ??????? ???? ??? ???.

2. SOAP ???

  • Simple Object Access Protocol? SOAP? ?????.
  • ? ???????? ??? ????? ??? ?? ???????? ??? ???? ?? ?? Simple Object Access Protocol Serialization? ?????.
  • ???? Simple Object Access Protocol Serialization ??? ?? ?????.
  • Simple Object Access Protocol Serialization? ???? Simple Object Access Protocol ???? ??? ???? ? ????.
  • ???. ?? ??. Serilaization. ???. Simple Object Access Protocol ???? ????? ????? Soap ??????? ????? ???.

3. XML ???

  • XML ???? ???? ??? ????? ?? ??? XML ????? ???? ? ????.
  • XML ??? ??? ???? ??? ??? ?? ?? ????.
  • XML ???? ???? ??? ??? ??? ?????.
  • XML ???? ??? ?????.
  • XML ???? ?? ?? ? ????.
  • XML ???? ?? ??? ? ????.
  • XmlAttribute? ??? ???? XML ???? ???? ??? ???? ? ????.

XmlAttribute ??? ???? ?? ?? ??? ?????.

??:

[XmlAttribute("Name")]
public string Name
{
get
{
return Name;
}
set
{
Name = val;
}
}
  • XmlSerializer? ???? XML ???? ???? ??? ??????.

XmlSerializer ??? ???? ?? ?? ??? ??????.

??:

XmlSerializer Serializer = new XmlSerializer(typeof(Prod));
using (TextWriter Writer = new StreamWriter(@"C:\Prod.xml"))
{
xmlSerializer.Serialize(Writer, prodObject);
}

4. ??? ?? ???

  • ?? ???? ??? ??? ? ????? ???? ?? ??? ?? ???? ?????.
  • ISerialized ?????? ???? ??? ?? ???? ??? ? ????.
  • GetObjectData() ???? ISerialized ?????? ?? ?????.

ISerialized ?????? ???? ??? ?? ???? ????? ?? ??? ?????.

??:

[Serializable]
public class Prod : ISerializable
{
public void GetObjectData(SerializationInfo information, StreamingContext cont)
{
//Usual code
}
}

?

??? C# ???? ????.

??? ??? ???? C# ????

??:

using System;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading.Tasks;
//a namespace called demo is created
namespace Demo
{
//Serializable attribute is declared
[Serializable]
//a class check is defined which will be used for serialization
class Check
{
public int identity;
public String nam;
static void Main(string[] args)
{
//an object of the check class is created to serialize it to the file Example.txt
Check ob = new Check();
ob.identity = 10;
ob.nam = "Shobha";
//a file stream is created
IFormatter format = new BinaryFormatter();
Stream stream1 = new FileStream(@"E:\Example.txt",FileMode.Create,FileAccess.Write);
//serialization of the object of the class check is done
format.Serialize(stream1, ob);
stream1.Close();
//a file stream is created
stream1 = new FileStream(@"E:\Example.txt",FileMode.Open,FileAccess.Read);
//the object of the class check is deserialized
Check ob1 = (Check)format.Deserialize(stream1);
//the data is written to the console
Console.WriteLine(ob1.identity);
Console.WriteLine(ob1.nam);
Console.ReadKey();
}
}
}

Output:

C# ???

In the above program, a namespace called demo is defined. Then a Serializable attribute is defined. A class check is defined to demonstrate the concept of serialization using this class. Two properties identity and nam are defined in the class to which the values 10 and Shobha are assigned respectively. Then an object of the check class is created to serialize it to the file Example.txt. Then a formatter class is defined to convert the object of the class check to a binary stream.

Then a file stream object is created to open the file Example.txt in write mode to write the values of the properties identity and nam into it. Then serialize method is used to transfer the binary data into the text file. Finally, We use deserialize method to deserialize the contents of the text file Example.txt and the data is written to the console as shown in the output snapshot above.

? ??? C# ???? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

?? ????
1742
16
Cakephp ????
1596
56
??? ????
1536
28
PHP ????
1396
31
???
C#? ?? ??? C#? ?? ??? Sep 03, 2024 pm 03:34 PM

C#? ?? ??? ??????. ???? ?? ???? ?? ??, ?? ?? ? ?? ??? ??? ?? ?????.

C#? ???? C#? ???? Sep 03, 2024 pm 03:34 PM

C#? ???? ??????. ???? ??? ?? ? ?? ??? ?? C#? ??? ?? ??? ?????.

?? ???? ??? C#? ?? ?? ???? ??? C#? ?? Apr 03, 2025 pm 02:57 PM

?? ???? ????? ???? ?? ???? ??? ?? ???? ???? ??, ?? ???? ???? ?? ?????? ??? ????? ????. ?? ???? ??? ??? ? ??? ???? ????? ??? ?? ??? ?????. ?? ???? ??? ??? ??? ????? ???? ???? ??? UI ???? ???? ?? ????. ?? ??? ?? ????? ???? ?? ??? ??? ?? ????. ?? ??? ??? ?? ???? ???? ?? ???? ?? ???? UI ?? ?? ?????? ?? ???? ??? ?????.

C#? ?? C#? ?? Sep 03, 2024 pm 03:35 PM

C#? ?? ???. ???? ?? ??? ?? C#? ??? ?? ??? ?? ?????.

C# vs. C : ??, ?? ? ?? ?? C# vs. C : ??, ?? ? ?? ?? Apr 19, 2025 am 12:07 AM

C#? C? ??? ??? ???? ??? ??? ????. 1.C? 1983 ? Bjarnestroustrup? ?? ???? ?? ?? ?????? C ??? ??????. Evolution ?????? ?? ??? ?? ? Lambda Expressions ?? C 11, C 20 ?? ?? ? ? ??? ?? ?? ???? ???? ?? ?? ? ??? ?? ?????? ??? ? ????. 2.C#? 2000 ? Microsoft? ?? ?????? C? Java? ??? ???? ??? ???? ???? ??? ???. ?? ??, C#2.0? ???? C#5.0 ?? ? ??? ?????? ?????, ?? ?? ???? ??? ? ???? ???? ??? ? ????.

C#? ?? C#? ?? Sep 03, 2024 pm 03:33 PM

C#? ?? ???. ????? ?? ? ?? ??? ?? C#? ?? ?? ? ?? 3?? ??? ?? ?????.

XML ??? ???? ?? XML ??? ???? ?? Apr 03, 2025 am 08:42 AM

XML ??? ???? ???? ?? ??? ????. Notepad? ?? ??? ???? ???? ??; XMLBeautifier? ?? ??? ?? ???? XML ?? ??? ?? ??; XSLT? ?? XML ?? ??? ???? ?? ??? ?????. ?? Python? ?? ????? ??? ???? ?? ???? ?????. ?? ??? ???? ?? ? ???????.

C#? ?? C#? ?? Sep 03, 2024 pm 03:34 PM

C#? Palindrome ??????. ???? C#? ?? ?? ?? ??? ??? ??? ?? ??? ??? ?? ?????.

See all articles