Mohsen Sarkar
Mohsen Sarkar

Reputation: 6040

What is following C# code equvalent to C++ CLI

In C#

public class cls {
    public static void met() {
    }
}

I want it in C++ CLI. The method met should not be visible to variables which are decelerated as cls.

I should be able to :

cls::met();

I shouldn't be able to :

cls z;
z.met();

Upvotes: 0

Views: 85

Answers (1)

Puppy
Puppy

Reputation: 147036

namespace cls {
    void met() {
    }
}

Welcome to C++, enjoy your stay.

Upvotes: 1

Related Questions