Top "Initialization" questions

Initialization deals with the task of initializing the contents of your data structure.

Declare and Initialize String Array in VBA

This should work according to another stack overflow post but its not: Dim arrWsNames As String() = {"Value1", "Value2"} Can anyone …

arrays vba initialization
How to initialize an array of objects in Java

I want to initialize an array of Player objects for a BlackJack game. I've read a lot about various ways …

java arrays object initialization
C char array initialization

I'm not sure what will be in the char array after initialization in the following ways. 1.char buf[10] = ""; 2. char buf[10] = " "; 3. …

c arrays char initialization buffer
How do I initialize an empty array in C#?

Is it possible to create an empty array without specifying the size? For example, I created: String[] a = new String[5]; …

c# arrays initialization
Best way to initialize (empty) array in PHP

In certain other languages (AS3 for example), it has been noted that initializing a new array is faster if done …

php arrays initialization
How to initialize private static members in C++?

What is the best way to initialize a private, static data member in C++? I tried this in my header …

c++ initialization static-members
Initialize a byte array to a certain value, other than the default null?

I'm busy rewriting an old project that was done in C++, to C#. My task is to rewrite the program …

c# .net arrays initialization
How to declare an ArrayList with values?

ArrayList or List declaration in Java has questioned and answered how to declare an empty ArrayList but how do I …

java arraylist initialization declare
Declare and initialize a Dictionary in Typescript

Given the following code interface IPerson { firstName: string; lastName: string; } var persons: { [id: string]: IPerson; } = { "p1": { firstName: "F1", lastName: "L1" }, "…

dictionary initialization typescript
Initialization of all elements of an array to one default value in C++?

C++ Notes: Array Initialization has a nice list over initialization of arrays. I have a int array[100] = {-1}; expecting it …

c++ arrays initialization variable-assignment default-value