Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace NullReferenceFortifyTest
- {
- class Widget
- {
- public int numberOfSpokes;
- public override bool Equals(object obj)
- {
- Widget a = obj as Widget;
- if (a != null)
- {
- if (a.numberOfSpokes == numberOfSpokes)
- {
- return true;
- }
- }
- return false;
- }
- public override int GetHashCode()
- {
- return numberOfSpokes.GetHashCode();
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Console.Out.WriteLine("Hello, World!");
- while (true) {; }
- }
- }
- }
Add Comment
Please, Sign In to add comment