1.
You are creating a class to compare a specially-formatted string. The default collation comparisons do not apply. You need to implement the IComparable(Of String) interface. Which code segment should you use?
2.
You write the following custom exception class named CustomException.
public class CustomException : ApplicationException {
public static int COR_E_ARGUMENT =
unchecked((int)0x80070057);
public CustomException(string msg) : base(msg) {
HResult = COR_E_ARGUMENT;
}
}
You need to write a code segment that will use the CustomException class to immediately return control to the COM caller. You also need to ensure that the caller has access to the error code.
Which code segment should you use?