Skip to content

Instantly share code, notes, and snippets.

@PhiHuyHoang
Created September 19, 2018 21:26
Show Gist options
  • Save PhiHuyHoang/3dc8d35839129889a3eadb3d90a0144d to your computer and use it in GitHub Desktop.
Save PhiHuyHoang/3dc8d35839129889a3eadb3d90a0144d to your computer and use it in GitHub Desktop.
Syntax for Extension Methods
public static class [YOUR_CLASS_NAME]
{
public static [RETURN_TYPE] [METHOD_NAME](this [TYPE_NAME] s)
{
// TODO: Write code here
}
}
/*
---[YOUR_CLASS_NAME]---: What ever you like
---[RETURN_TYPE]---: What ever you want
---[METHOD_NAME]---: ... like those 2 above
---[TYPE_NAME]---: type of [METHOD_NAME] that will be add.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment