Question:You need to create a class definition that is interoperable along with COM. You need to ensure that COM applications can create instances of the class and can call the GetAddress method. Which code segment should you use? 

A public ref class Customer {
string addressString;
public:
Customer(string address) : addressString(address) { } String= GetAddress() { return addressString; }
} 

B public ref class Customer {
string addressString;
public:
Customer() { }
private:
String= GetAddress() { return addressString; }
}
 

C public ref class Customer {
string addressString;
public:
Customer() { }
String= GetAddress() { return addressString; }
} 

D public ref class Customer {
static string addressString;
public: Customer() { }
static String= GetAddress() { return addressString; } } 

+ Answer
+ Report
Total Preview: 716

Copyright © 2024. Powered by Intellect Software Ltd