private void CopyWithProgress(string[] filenames) { // Display the ProgressBar control. pBar1.Visible = true; // Set Minimum to 1 to represent the first file being copied. pBar1.Minimum = 1; // Set Maximum to the total number of files to copy. pBar1.Maximum = filenames.Length; // Set the initial value of the ProgressBar. pBar1.Value = 1; // Set the Step property to a value of 1 to represent each..
using System; using System.Threading; // Simple threading scenario: Start a static method running // on a second thread. public class ThreadExample { // The ThreadProc method is called when the thread starts. // It loops ten times, writing to the console and yielding // the rest of its time slice each time, and then ends. public static void ThreadProc() { for (int i = 0; i < 10; i++) { Console.W..
private void button1_Click(object sender, System.EventArgs e) { Stream myStream = null; OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = "c:\\" ; openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*" ; openFileDialog1.FilterIndex = 2 ; openFileDialog1.RestoreDirectory = true ; if(openFileDialog1.ShowDialog() == DialogResult.OK) { try { if..
public static void CreateMessageWithAttachment(string server) { // Specify the file to be attached and sent. // This example assumes that a file named Data.xls exists in the // current working directory. string file = "data.xls"; // Create a message and set up the recipients. MailMessage message = new MailMessage( "jane@contoso.com", "ben@contoso.com", "Quarterly data report.", "See the attached..
명령줄에서 실행 파일에 제공되는 인수에는 Main의 선택적 매개 변수를 통해 액세스할 수 있습니다. 인수는 문자열의 배열 형식으로 제공됩니다. 배열의 각 요소에는 인수 하나가 포함됩니다. 인수 사이의 공백은 제거됩니다. 예를 들어, 가상의 실행 파일에 대한 다음과 같은 명령줄 호출을 생각해 볼 수 있습니다. 명령줄 입력 Main에 전달되는 문자열 배열 executable.exe a b c "a" "b" "c" executable.exe one two "one" "two" executable.exe "one two" three "one two" "three" 참고: Visual Studio에서 응용 프로그램을 실행할 때 프로젝트 디자이너, 디버그 페이지에서 명령줄 인수를 지정할 수 있습니다. 예제 이 예제..
private void validateUserEntry() { // Checks the value of the text. if(serverName.Text.Length == 0) { // Initializes the variables to pass to the MessageBox.Show method. string message = "You did not enter a server name. Cancel this operation?"; string caption = "Error Detected in Input"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result; // Displays the MessageBox. result..
조건에 따라 두 식 중 하나를 반환합니다. test ? expression1 : expression2 인수 test 임의의 Boolean 식입니다. expression1 test가 true이면 반환되는 식입니다. 쉼표 식이 될 수 있습니다. expression2 test가 false이면 반환되는 식입니다. 쉼표 식이 될 수 있습니다. 설명 ?: 연산자는 if...else 문의 단축형으로 사용할 수 있으며 일반적으로 if...else 문을 사용하면 너무 복잡해지는 식에서 사용합니다. 예를 들면 다음과 같습니다. var now = new Date(); var greeting = "Good" + ((now.getHours() > 17) ? " evening." : " day."); 현재 시각이 오후 6시 이후..
- Total
- Today
- Yesterday
- React
- 문자 자르기
- 인텔리제이(intellij)
- REST API
- error-java
- In App Purchase
- 스프링 시큐리티(spring security)
- java-개발 환경 설정하기
- system.io
- await
- MainActor
- java 키워드 정리
- nl2br
- 스프링 프레임워크(spring framewordk)
- 스프링 프레임워크(spring framework)
- jstl(java standard tag library)
- jstl(java standard tag library)-core
- .submit()
- 진수 변환
- 람다식(lambda expression)
- java web-mvc
- jsp 오픈 소스
- 스프링 시큐리티(spring security)-http basic 인증
- 제품 등록
- System.Diagnostics
- 표현 언어(expression language)
- 특정 문자를 기준으로 자르기
- docker
- 메이븐(maven)
- java.sql
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |