• Constructor or builder?


    In the process of instantiating a class, constructors with multiple parameters are usually encountered, but what if some parameters are not required? Do you want to initialize so many parameters every time? public class Person { Private int ID; // ID card No Private string name; // name Private int age; // age Private Boolean […]

  • C ා if else statement


    I. Introduction An IF statement can be followed by an optional else statement, which is executed when the Boolean expression is false. Two. Grammar If (judgment condition) { Code executed; } else { Code executed; } Description: Execution process:When the program executes to if, it first determines if the parenthesis of if is to determine […]

  • Python foundation function


    function What is a function Function is a tool that can be called repeatedly Why use functions Prevent code redundancy; do not use functions, poor code readability How to use functions Definition of function Keyword (DEF) function name (index) parentheses ():“” “function description: used to describe the function code body’s function” “” def index(): “” […]

  • Dynamic analysis of JSON


     Recently, JSON needs to be parsed dynamically in projects, but there are many ways to parse JSON. How to parse it reasonably is the problem we need to consider? For example, jtoken and jobobject provided under newtonsoft.json.linq and jsonconvert provided under newtonsoft.json. JObject  Used to manipulate JSON objects JArray For manipulating JSON arrays JValue Represents […]