mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
25 lines
439 B
C#
25 lines
439 B
C#
using System;
|
|
|
|
public class Container
|
|
{
|
|
public object[] Buffer { get; } = new object[10];
|
|
}
|
|
|
|
public class TestIndex
|
|
{
|
|
public void M()
|
|
{
|
|
var c = new Container()
|
|
{
|
|
Buffer =
|
|
{
|
|
[0] = new object(),
|
|
[1] = new object(),
|
|
[^1] = new object()
|
|
}
|
|
};
|
|
c.Buffer[4] = new object();
|
|
c.Buffer[^3] = new object();
|
|
}
|
|
}
|