Skip to content

cotrClass

Creates a class

Aliases:

  • cotrClass
  • class
  • objectTemplate

cpp

class MyClass {
// Your code here
};

csharp

public class MyClass {
// Your code here
}

dart

class MyClass {
// Your code here
}

go

type MyStruct struct {
field1 type1
field2 type2
// Add more fields here
}

java

public class MyClass {
// Your code here
}

javascript

class MyClass {
// Your code here
}

javascriptreact

class MyClass {
// Your code here
}

kotlin

class MyClass {
// Your code here
}

perl

package MyClass;
# Your code here

php

class MyClass {
// Your code here
}

powershell

Terminal window
class MyClass {
# Your code here
}

python

class MyClass:
# Your code here

r

# R does not have a built-in class type. Use a list or vector instead.

ruby

class MyClass
# Your code here
end

rust

struct MyStruct {
field1: type1,
field2: type2,
// Add more fields here
}

scala

class MyClass {
// Your code here
}

swift

class MyClass {
// Your code here
}

typescript

class MyClass {
// Your code here
}

typescriptreact

class MyClass {
// Your code here
}