본문 바로가기

전체 글

(105)
for foreach [C#] List using System;using System.Collections.Generic; namespace Console1{ class Program { static void Main(string[] args) { List animals = new List(); animals.Add("cat"); animals.Add("dog"); animals.Add("fox"); foreach (string animal in animals) { Console.WriteLine(animal); } } }} /* Outputcatdogfox*/ using System;using System.Collections.Generic; namespace Console1{ class Program { static void Main(st..
for foreach [C#] string using System; namespace Console1{ class Program { static void Main(string[] args) { string words = "Hello"; foreach (var c in words) { Console.WriteLine(c); } } }} /* OutputHello*/ using System; namespace Console1{ class Program { static void Main(string[] args) { string words = "Hello"; for (int i = 0; i < words.Length; i++) { Console.WriteLine(words[i]); } } }} /* OutputHello*/
for foreach [C#] int using System; namespace Console1{ class Program { static void Main(string[] args) { for (int i = 0; i < 4; i++) { Console.WriteLine(i); } } }} /* Output0123*/ using System; namespace Console1{ class Program { static void Main(string[] args) { int[] arr = { 0, 1, 2, 3 }; foreach (int i in arr) { Console.WriteLine(i); } } }} /* Output0123*/
for [Python] List # Python 3 items = [7, 'hi', 3.14, ['as', 3]] for item in items: print(item) """ Output7hi3.14['as', 3]"""
for [Python] string # Python 3 words = 'Python' for c in words: print(c) """ OutputPython""" # Python 3 words = 'Python' for i in range(len(words)): print(i, words[i]) """ Output0 P1 y2 t3 h4 o5 n""" # Python 3 words = 'Python' for i, c in enumerate(words): print(i, c) """ Output0 P1 y2 t3 h4 o5 n"""
for [Python] range # Python 3 for i in range(4): print(i) """ Output0123"""
[Reference] Excel & VBA Office developmentOffice client developmentExcelExcel Primary Interop Assembly ReferenceExcel Primary Interop Assembly Class LibraryMicrosoft.Office.Interop.Excel namespaceOffice VBA ReferenceExcel VBA reference
[Reference] Your First Windows Program in C++ / Closing the Window Windows Dev CenterDevelop Windows desktop applicationsGet started - New to application development?Desktop ProgrammingLearn to Program for Windows in C++Module 1. Your First Windows ProgramClosing the Window