2021년 목표설정

이미지
기본적으로 작년에 달성하지 못한 것들을 하려고 생각중인데..코로나가 언제까지 이어질지, 한국이나 북해도는 갈 수 있을지..자격증은 응시 가능할지..여러가지가 불확실하다. 2021년은 무엇보다 정신적인 부분과 경제적인 부분에 중점을 두고 조금 더 치열하게 지내보고 싶다. 일본나이로도 30대 마지막 해, 이제 불혹에 접어드는 나이..복잡하지만 심플하게. 육체적목표 : 트라이에슬론 스탠다드 도전하기 정신적 : 자격증2개 도전 + 자체개발 서비스 론칭 가족적 : 가정의 평화를 유지하기 경제적 : 외식과 유흥비를 줄이고 부수입을 늘려서 결과적으로 저축하기 사회적 : 목표세미나를 포함해서 민단과 개인인맥의 활성화와 교류를 촉진하기

C# 프로그래밍 예제 네 번째!!


문제 : 입력값을 배열로 받은 후 쉼표를 제거하고 배열을 역순으로 출력할 것

[ Source Code ]
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace array1
{
 /// <summary>
 /// Summary description for Form1.
 /// </summary>
 public class Form1 : System.Windows.Forms.Form
 {
  private System.Windows.Forms.Label label1;
  private System.Windows.Forms.Label label2;
  private System.Windows.Forms.Button button1;
  private System.Windows.Forms.TextBox textBox1;
  private System.Windows.Forms.TextBox textBox2;
  /// <summary>
  /// Required designer variable.
  /// </summary>
  private System.ComponentModel.Container components = null;
 
  public Form1()
  {
   //
   // Required for Windows Form Designer support
   //
   InitializeComponent();
   //
   // TODO: Add any constructor code after InitializeComponent call
   //
  }
  /// <summary>
  /// Clean up any resources being used.
  /// </summary>
  protected override void Dispose( bool disposing )
  {
   if( disposing )
   {
    if (components != null)
    {
     components.Dispose();
    }
   }
   base.Dispose( disposing );
  }
  #region Windows Form Designer generated code
  /// <summary>
  /// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  /// </summary>
 
  /// Form 관련 디자인 소스는 생략하였음...너무 길어요...ㅡㅜ
  /// <summary>
  /// The main entry point for the application.
  /// </summary>
  [STAThread]
  static void Main()
  {
   Application.Run(new Form1());
  }
  private void button1_Click(object sender, System.EventArgs e)
  {
   /*
    * 내가 만든 소스...
   char[] split={','};
   string[] inputArray;
   inputArray = new string[100];
   inputArray = textBox1.Text.Split(split,textBox1.Text.Length);
   Array.Reverse(inputArray,0,inputArray.Length);
   textBox2.Text = inputArray;
   // 여기서 string[] 을 string 으로 잡아주면 출력 가능한데...ㅜㅜ
   */
 
   // 도훈 군의 작품...
   string[] inputArray = textBox1.Text.Split(',');
   textBox2.Text = null;
   foreach(object x in inputArray)
   {
    textBox2.Text = x + " " + textBox2.Text;
   }
 
  }
  private void Form1_Load(object sender, System.EventArgs e)
  {
 
  }
 }
}

댓글

이 블로그의 인기 게시물

성공적인 소셜커머스를 위한 10단계 전략

[C# & LINQ] 랜덤으로 데이터를 한 개 추출하는 방법

[메모] PostgreSQL에서 Insert 하는 경우 자동채번 PK가 중복에러 나는 경우