需要以下面试问题的答案吗? [英] Need answer for the below interview question ?
本文介绍了需要以下面试问题的答案吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的面试官向我问了以下问题,即
为HelloWorld创建类吗?
而我的答案在下面
My interviewer asked the below question on me that is
Create class for HelloWorld ?
and my answer was below
public class fnhelloworld()
{
MessageBox.Show("Hello World");
}
对吗?
问候,
Peer Mohammed.A
is it right ?
Regards,
Peer Mohammed.A
推荐答案
否,在下面尝试
No,try below
public class fnhelloworld
{
public fnhelloworld()
{
MessageBox.Show("Hello World");
}
}
并先阅读文档
类(C#编程指南) [
And read the Documentation first
Classes (C# Programming Guide)[^]
错误的类不包含()
类可以这样创建.. :)
it is wrong class doen''t contain ()
Class can be created like this.. :)
public class HelloWorld
{
public string HelloWorldSyntax { get; set; }
}
在这里,我用HelloWorldSyntax
字符串属性创建了HelloWorld
类..:)
C#类简介 [
here i have created HelloWorld
class with HelloWorldSyntax
string property.. :)
Introduction to C# classes[^]
这篇关于需要以下面试问题的答案吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文