-
MY PROJECTS
-
Recent Posts
- SpringBoot.Making our first starter and autoconfiguration
- Spring. Creating main annotation to start business logic
- Spring.Reading from properties file
- Spring.How to define spring version inside springBoot ?
- SpringBoot App inside Docker
- Kafka.FirstExperience
- Docker.MySql and Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
- Gradle.Tips
- Spring.AppConfig
- Leetcode.Best-time-to-buy-and-sell-stock
- LeetCode.ClimbStairs.Fibbonacci
- Leetcode.Roman-to-integer
- LeetCode.Palindrome-number
- Java.DesignPatterns.Lightweight
- Java.DesignPatterns.Proxy
- Java.DesignPatterns.Facade
- Java.DesignPatterns.Composite
- Java.DesignPatterns.Bridge
- Java. Strange OOP thing
- Java.Classpath
Categories
- Aptana
- Azure
- C#
- DataSnap
- DBExpress
- Delphi
- Delphi и сети
- Delphi. Язык программирования
- ExtJS
- FastReport
- FireDAC
- FireMonkey
- GIT
- ICS
- IDE
- IIS
- Indy
- InnoSetup
- javascript
- jQuery
- JSON
- LiveBindings
- MSHTML
- MySQL
- PHP
- REST
- Ribbons
- SMS
- SQL инструкции
- SVN
- TRichView
- UniGui
- WebBroker
- WinAPI
- Windows
- Алгоритмы
- Без рубрики
- Деревья
- Ищу ответ
- Компонентостроение
- Мои компоненты
- Начальный уровень
- Обработка исключений
- Парсинг
- Потоки(Threads)
- Регулярные выражения
- Тестирование приложений
Daily Archives: 13.01.2017
C#. Создание и инициализация массивов
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ArrayExamples { public partial class fArrayExamples : Form { public fArrayExamples() { InitializeComponent(); } private void createArray_way1_Click(object sender, EventArgs e) { // Create and initialization of array of 3 elements way 1 int[] someIntArray = new int[3]; someIntArray[0] = 1; someIntArray[1] = 2; someIntArray[2] = 3; textBox.Text += "Create and initialization of array of 3 elements way 1" + Environment.NewLine + ""; textBox.Text += Environment.NewLine + " someIntArray[1]=" + someIntArray[0].ToString() + Environment.NewLine + " someIntArray[2]=" + someIntArray[1].ToString() + Environment.NewLine + " someIntArray[3]=" + someIntArray[2].ToString() + Environment.NewLine; } private void createArray_way2_Click(object sender, EventArgs e) { textBox.Text += Environment.NewLine; // Create and initialization of array of 3 elements way 2 textBox.Text += "Create and initialization of array of 3 elements way 2" + Environment.NewLine+""; int[] someIntArray2 = { 1, 2, 3 }; textBox.Text += Environment.NewLine + " someIntArray[1]=" + someIntArray2[0].ToString() + Environment.NewLine + " someIntArray[2]=" + someIntArray2[1].ToString() + Environment.NewLine + " someIntArray[3]=" + someIntArray2[2].ToString() + Environment.NewLine; } private void create3DimensionalArray_Click(object sender, EventArgs e) { textBox.Text += Environment.NewLine; int[,,] some3DArray = new int[1, 1, 1]; textBox.Text += "Create and initialization of 3 dimensional array" + Environment.NewLine + ""; textBox.Text += Environment.NewLine + " some3DArray[0,0,0]=" + some3DArray[0, 0, 0].ToString() + Environment.NewLine; } } } |
Posted in C#
Comments Off on C#. Создание и инициализация массивов