This big difference in syntax is really rather delicate and can lead to a "gotcha" and that is explained by Bill Wagner in a put up entitled @Jenix In that scenario, It is a method as an alternative to a property. You'd reference it elsewhere like var someString = Foo.HelloWorld(); https://propertyingurugram.in/elevating-the-experience-future-ready-luxury-homes-in-gurugram/