mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
22 lines
374 B
C#
22 lines
374 B
C#
using System.Collections.Generic;
|
|
|
|
class Bad
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
var names = GetNames();
|
|
var list = (List<string>) names;
|
|
list.Add("Eve");
|
|
}
|
|
|
|
static IEnumerable<string> GetNames()
|
|
{
|
|
var ret = new List<string>()
|
|
{
|
|
"Alice",
|
|
"Bob"
|
|
};
|
|
return ret;
|
|
}
|
|
}
|