I know this is stupid question. I can create an empty class like the following in c#.
class Customer{}
But How can I do this in F#? This is my try
type Customer() =
let _ = ()
What is the correct way?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try
Normally, you can leave the
classandendtokens implicit and the compiler infers their presence at the beginning and end of the class’s definition, but if the class is completely empty you’ll need to specify them. Likewise, you can usestruct endandinterface endto generate structs and interfaces.