Не буду уточнять откуда вопросы, чтобы рекламы не было
Вопрос1: не очень понимаю, о чем вообще в вопросе спрашивают, слова по отдельности понимаю, но вот вместе они не складываются...
Within an instance constructor of a struct type, which one of the following key words behaves exactly as an output parameter of the struct type?
Choice 1
base
Choice 2
ref
Choice 3
this
Choice 4
object
Choice 5
value
Вопрос2: объясните, как после такого приведения выводится 4 ? Мне не очень понятно...
public enum Parts {
Engine = 1,
Wheels,
Brakes
}
class c
{
public static void Main()
{
try
{
Parts lineItem = (Parts)4;
Console.WriteLine(lineItem);
}
catch
{
Console.WriteLine("Exception");
}
Console.ReadKey();
}
}