mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
25 lines
420 B
C#
25 lines
420 B
C#
using System;
|
|
|
|
class Program
|
|
{
|
|
[Obsolete]
|
|
static void ObsoleteMethod()
|
|
{
|
|
// GOOD: Calling obsolete methods in obsolete methods
|
|
ObsoleteMethod();
|
|
}
|
|
|
|
static void NotObsoleteMethod()
|
|
{
|
|
}
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
// BAD: Call to obsolete method
|
|
ObsoleteMethod();
|
|
|
|
// GOOD: Call to non-obsolete method
|
|
NotObsoleteMethod();
|
|
}
|
|
}
|