Dan
Dan
CC#
Created by Dan on 4/25/2023 in #help
Object Method error
True is only outputted with referenceclass2 not with referenceclass1. I can probably avoid with exception handling but this is for practice. Any ideas why the error
Class1 referenceclass1 = new Class1(word); referenceclass1.word = "area"; referenceclass1.sentence = "area is a word"; referenceclass1.letters = 12; Class1 referenceclass2 = new Class1("apple", "apple is a fruit", 13); Console.WriteLine(referenceclass1.IsWord()); Console.WriteLine(referenceclass2.IsWord());
41 replies