Good coding habits

xiaoxiao2021-03-06  66

First write documentation, clear thinking: Write a swap function requires to exchange two data first: write documentation and clarify code flow ///

/// Exchange two shaping variables /// /// A value of B /// b is placed in a public void swap (Ref Int A, REF INT B) {// Save B Value // A-> B / / Save B Value -> A} Step 2: Fill in code /// // / Exchange two plastic variables Value /// /// A of the B /// B is placed in a Public void swap (Ref Int A, REF INT B) {// Save B = B; // A-> BB = A; // Save B value -> aa = C; Return;}

转载请注明原文地址:https://www.9cbs.com/read-90132.html

New Post(0)