Example: Hello World

As stated previously, the .NET Framework is both a specification and an implementation. Given that this book is intended for use by developers, it is about time that we demonstrated some of the framework's abilities. This simple example will highlight just how powerful and flexible the language integration between .NET languages is.

Listing 1.1 defines a Python class called HelloWorldPY.

Listing 1.1. Python class: HelloWorldPY
class HelloWorldPY:
    def __init__(self):
        self.message = "Hello World from Python!"
    def SayHello(self):

if __name__=="__main__":
    AnObject = HelloWorldPY()

The class HelloWorldPY defines two methods, a constructor ...

Get Programming in the .NET Environment now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.