<p>I have a question about using <code>new[]</code>.</p>

<p>Imagine this:</p>

<pre><code>Object.SomeProperty = new[] {"string1", "string2"};
</code></pre>

<p>Where SomeProperty expects an array of strings.</p>

<p>I know this code snippet will work. But i want to know what it does under the hood. Does <code>new[]</code> makes an instance of the class <code>object</code> and in <code>SomeProperty</code> it converts it automatically to a <code>string</code> object? </p>

<p>Thanks</p>

This is just syntactical sugar. The compiler will infer the type actually necessary here and create code that is equivalent to the explicit construct:
```
```
Object.SomeProperty = new string[] {"string1", "string2"};
```
```
There's no such thing as
```
new[]
```
that gets executed at runtime.