热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Microsoft .NET 面试题与答案

Test your skills through the online practice test: Microsoft .NET Quiz Online Practice Test

问题 31. Write code to show how a method can accept a varying number of parameters.

using System;
namespace Console1
{
class Class1
{
static void Main(string[] args)
{
ParamsMethod(1,"example");
ParamsMethod(1,2,3,4);
Console.ReadLine();
}
static void ParamsMethod(params object[] list)
{
foreach (object o in list)
{
Console.WriteLine(o.ToString());
}
}
}
}

这有帮助吗? 添加评论 查看评论
 

问题 32. What is an overloaded method?

An overloaded method has multiple signatures that are different.

这有帮助吗? 添加评论 查看评论
 

问题 33. What is recursion?

Recursion is when a method calls itself.

这有帮助吗? 添加评论 查看评论
 

问题 34. What is a constructor?

A constructor performs initialisation for an object (including the struct type) or class.

这有帮助吗? 添加评论 查看评论
 

问题 35. If I have a constructor with a parameter, do I need to explicitly create a default constructor?

Yes

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。