본문 바로가기

.NET5

delegate 알아보기 Delegate는 대리자라고 해석할 수 있는데 C언어를 공부해 본 적이 있는 사람은 함수포인터(Function Pointer)라는 것에 대해서 들어보았을 텐데요. 이 함수포인터와 비슷하다고 보면 됩니다. 제가 VB.NET 2008로 올린 글 http://fromyou.tistory.com/15 을 보시면 VB.NET에서 이용하는 delegate에 대해서 설명을 해 놓았습니다. C#이나 VB.NET은 형식의 조그마한 차이가 있을 뿐 사용은 거의 비슷한 것 같습니다. 제가 VB.NET2008로 멀티채팅프로그램(http://fromyou.tistory.com/16) 만들 때 서버나 클라이언트에서 이벤트가 발생하면 그것을 비동기 전송하기 위해서 콜백함수를 이 delegate로 만들었는데요. 참 편리하더군요. 시.. 2008. 9. 19.
몫과 나머지 구하기 오늘은 간단하게 몫과 나머지를 구하는 방법을 알아보겠습니다. 몫을 구하는 연산자 : \ 나머지를 구하는 연산자 : Mod 전체소스 실행결과 의외로 프로그램을 짜다보면 기본적인 연산자를 몰라서 어려움을 겪는 때가 많은데 기본에 충실하여 보다 좋은 프로그램을 작성하시는데 도움이 되시길 바랍니다. 2008. 7. 22.
how to set Event Handler at runtime How to set Event Handler at runtime? Not only can you create event handlers at design time, but you can also assign them at run time. First create the event handler. You must get the routine’s parameters exactly correct for the type of event handler you want to create. For example, a TextBox control’s TextChanged event handler must take two parameters with types System.Object and System.EventArg.. 2008. 6. 24.
how to Initialize Class Member Variables Initializing Class Member Variables When you create a class object, you will normally immediately assign values to specific class member variables. For example, the following code fragment defines a Person class that contains fields for a Name, Age, OfficeNumber, and CellularPhoneNumber: Class Person Public Name As String Public Age As Integer Public OfficeNumber As String Public CellularPhoneNu.. 2008. 6. 24.