When you declare a method, the declaration statement has several parts:
access-type return-type method-name (parameter-list)
{
... body ...
}
Where
access-type is one of private, public, protected, internal, protected internal, or omitted completely.
return-type defines what type of value the method returns to the caller
method-name defines what name will be used to execute the method from other code
parameter-list defines what values must be passed to the method when it is called.
The parameter-list is a sequence of parameter definitions, separated by commas:
access-type return-type method-name (parameter-definition, parameter-definition, ...)
Each parameter-definition declares a local variable which is available only within the method, and which must be passed a value when you call the method. The definition follows exactly the same format as that for a "normal" variable:
variable-type variable-name (with an optional initializer)
And the variable-type can be any type which is known to the system at that point in the code - this includes all the types you are used to, such as
int
,
string
,
byte[]
, and so on, but also any of the types that you can define in your code, or import via an external assembly.
So your method declaration of
public void Encode(Video video)
{
...
}
Says that the method accepts a parameter which is a
Video
type, and is accessible within the method by the name
video
The type
Video
is presumably a class type that has been defined elsewhere in the code - it's not a standard .NET class name.
This is why I hate you-tube video tutorials: they are generally made by people with little or no actual knowledge, and less training ability than video skills. Ignore them, get a book - or better a course - and learn properly. video tutorials are normally a complete and utter waste of your time, his time, and electrons...