def _GenerateBeginningCode(required_namespaces, namespace):
    """
    First method called to generate the c# wrapper code.
    This generates the using statements and the namespace declaration.
    """
    code = []
    for name in required_namespaces:
        code.append("using {0};\n".format(name))

    code.append("\n\n")
    code.append("namespace {0}\n{{".format(namespace))
    code.append("\n\n")

    return "".join(code)