728x90 반응형 전체 글295 C#] Polymorphic Serialization and Deserialization with System.Text.Json 출처 : https://code-maze.com/csharp-polymorphic-serialization-and-deserialization/ System.Text.Json이란? .NET개발자가 JSON format을 handling할 수 있는 powerful한 package이다. System.Text.Json 소개 C#] System.Text.Json vs Newtonsoft.Json 차이점 비교 MS는 2019년 .Net Core 3.0과 함께 System.Text.Json namespace를 release했다. Newtonsoft.Json 에서 System.Text.Json으로 migration을 고려하게 되었다. Newtonsoft.Json과 비교하며, migration 장단점을 확인.. big.. 2022. 8. 10. C#] System.Text.Json vs Newtonsoft.Json 차이점 비교 MS는 2019년 .Net Core 3.0과 함께 System.Text.Json namespace를 release했다. Newtonsoft.Json 에서 System.Text.Json으로 migration을 고려하게 되었다. Newtonsoft.Json과 비교하며, migration 장단점을 확인해보자. Why a new System.Text.Json library? Nowtonsoft.Json은 오랫동안 .Net developer에게 JSON의 serializing, deserializing용도로 친숙하게 사용되었다. System.Text.Json이 새롭게 소개된 배경에는 performance, security가 있다. System.Text.Json은 .Net Core 3.X 부터는 runtime에 포.. 2022. 7. 28. C#] Benefits of Polymorphism, 다형성 장점 아래 예로 살펴보자. abstract class Animal // Base class (parent) { // Abstract method (does not have a body) public abstract void animalSound (); } class Pig : Animal // Derived class (child) { public override void animalSound() { Console.WriteLine("The pig says: wee wee"); } } class Dog : Animal // Derived class (child) { public override void animalSound() { Console.WriteLine("The dog says: bow wow"); .. 2022. 7. 27. C#] Inheritance, Polymorphism, Abstraction, Interface Inheritance 자식 클래스 Derived Class (child) - the class that inherits from another class 부모 클래스 Base Class (parent) - the class being inherited from To inherit from a class, use the : symbol new class 생성 시, existing class의 method, fields를 재사용하기 위한 목적이다. class Vehicle // base class (parent) { public string brand = "Ford"; // Vehicle field public void honk() // Vehicle method { Console.WriteLine("Tuu.. 2022. 7. 21. ASP.NET MVC] Web.config transform file Web.config transform file deploy시, Web.config 파일이 어떻게 수정되는지 지정하는 XML file이다. Transformation action은 XML-Document-Transform namespace에서 정의된 XML attribute(xdt prefix, Locator, Transform)를 사용하여 지정한다. XML attributes 1) Locator : Web.config element 지정, optional 2) Transform : Locator attribute가 찾은 element로 무엇을 할지 지정 Locator Attribute Syntax 1) Condition 2) Match 3) XPath Transform Attribute Syntax 1).. 2022. 7. 21. C#] LINQ - Projection Linq에서 projection은 지속 사용할 properties만 담긴 새로운 object를 생성하는 작업이다. projection operations 1. Select 2. SelectMany class Bouquet { public List Flowers { get; set; } } static void SelectVsSelectMany() { List bouquets = new() { new Bouquet { Flowers = new List { "sunflower", "daisy", "daffodil", "larkspur" }}, new Bouquet { Flowers = new List { "tulip", "rose", "orchid" }}, new Bouquet { Flowers = new .. 2022. 7. 20. 이전 1 ··· 24 25 26 27 28 29 30 ··· 50 다음 728x90 반응형