Repository: dotnet/runtime
File: src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs (C#)

Code before:
        private readonly object _lock;

        internal sealed class DirectoryMonitor
        {
            internal FileSystemWatcher Fsw;
        }

        internal sealed class FileChangeEventTarget
        {
            private readonly string _fileName;
            private readonly OnChangedCallback _onChangedCallback;
            private readonly FileSystemEventHandler _changedHandler;
            private readonly ErrorEventHandler _errorHandler;
            private readonly RenamedEventHandler _renamedHandler;

            private static bool EqualsIgnoreCase(string s1, string s2)
            {
                if (string.IsNullOrEmpty(s1) && string.IsNullOrEmpty(s2))
                {
                    return true;
                }
                if (string.IsNullOrEmpty(s1) || string.IsNullOrEmpty(s2))
                {
                    return false;
                }
                return string.Equals(s1, s2, StringComparison.OrdinalIgnoreCase);
            }

            private void OnChanged(object sender, FileSystemEventArgs e)
            {
                if (EqualsIgnoreCase(_fileName, e.Name))
                {
                    _onChangedCallback(null);
                }
            }

            private void OnError(object sender, ErrorEventArgs e)
            {
                _onChangedCallback(null);
            }

            private void OnRenamed(object sender, RenamedEventArgs e)
            {
                if (EqualsIgnoreCase(_fileName, e.Name) || EqualsIgnoreCase(_fileName, e.OldName))
                {
                    _onChangedCallback(null);
                }
            }

            internal FileSystemEventHandler ChangedHandler { get { return _changedHandler; } }
            internal ErrorEventHandler ErrorHandler { get { return _errorHandler; } }

Review comment (suggestion):
```suggestion
                return s1.Equals(s2, StringComparison.OrdinalIgnoreCase);
```

Code after:
        private readonly object _lock;

        internal sealed class DirectoryMonitor
        {
            internal FileSystemWatcher Fsw;
        }

        internal sealed class FileChangeEventTarget
        {
            private readonly string _fileName;
            private readonly OnChangedCallback _onChangedCallback;
            private readonly FileSystemEventHandler _changedHandler;
            private readonly ErrorEventHandler _errorHandler;
            private readonly RenamedEventHandler _renamedHandler;

            private static bool EqualsIgnoreCase(string s1, string s2)
            {
                if (string.IsNullOrEmpty(s1) && string.IsNullOrEmpty(s2))
                {
                    return true;
                }
                if (string.IsNullOrEmpty(s1) || string.IsNullOrEmpty(s2))
                {
                    return false;
                }
                return s1.Equals(s2, StringComparison.OrdinalIgnoreCase);
            }

            private void OnChanged(object sender, FileSystemEventArgs e)
            {
                if (EqualsIgnoreCase(_fileName, e.Name))
                {
                    _onChangedCallback(null);
                }
            }

            private void OnError(object sender, ErrorEventArgs e)
            {
                _onChangedCallback(null);
            }

            private void OnRenamed(object sender, RenamedEventArgs e)
            {
                if (EqualsIgnoreCase(_fileName, e.Name) || EqualsIgnoreCase(_fileName, e.OldName))
                {
                    _onChangedCallback(null);
                }
            }

            internal FileSystemEventHandler ChangedHandler { get { return _changedHandler; } }
            internal ErrorEventHandler ErrorHandler { get { return _errorHandler; } }