我希望成为.NET(C#)的优秀程序员。 [英] I want to be a good programmar in .NET (C#).

查看:54
本文介绍了我希望成为.NET(C#)的优秀程序员。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,

我想成为.NET(C#)的优秀程序员。但我无法理解这样的事情,比如应该使用什么索引,比如为我们使用这种语法的文本预先着色:system.drawaing.color.colorname或dropdownlist1.selecteditem.tostring()来显示下拉列表的值



说明:

喜欢上传文件我使用此代码:

Sir,
I want to be a good programmar in .NET (C#). But I can not understand such thing properly like what index should be used after one another like to forecolor a text we use this syntax: system.drawaing.color.colorname or dropdownlist1.selecteditem.tostring() to show value of the dropdownlist

Explanation:
Like to upload file I use this code:

String path = Path.GetFileName(FileUpload1.FileName);
        string fileType = Path.GetExtension(FileUpload1.FileName);
        byte[] imageSize = FileUpload1.FileBytes;
        long size = (imageSize.Length / 1024);
        string fileName = FileUpload1.FileName;
        FileUpload1.SaveAs(Server.MapPath("MyUploads/" + fileName));

                Image1.ImageUrl = "MyUploads/" + fileName;
                Image1.ToolTip = FileUpload1.FileName;
                Image1.Height = Image1.Width = 200;
                Image1.Visible = true;
                Label1.Text = "";



你可以在Path之后看到我们使用语法Getfilename。然后在括号中fileupload1.filename





我只想用自己的数学规则来做。要上传文件,还有其他编码。不同的程序员有不同的编码风格。因为他们确切地了解应该依次使用哪种语法。我想要像他们一样。我想以自己的方式编码。我的想法应该清楚我要做什么,我要知道编码语法。所以请帮助我。





是否有任何规则要编程?或者只是用一些固定的规则来填充.NET。

我想像我自己解决数学问题一样编程,我不会或很少关注帮助书。如果我按照数学帮助书,我了解发生了什么,它是如何解决的。但是在.NET中我无法正确理解。

因此在.NET中,我将准确了解应该一个接一个地使用哪个索引。请以简单的方式给我建议。



问候。



Hasan Al Banna



我尝试了什么:



我想成为.NET的优秀程序员( C#)。


You can see after Path we use syntax Getfilename. Then in brackets fileupload1.filename


I just want to do it with rules like mathematics by own. To upload file there are other coding also. Different programmar has their different coding style. Because they learn it exactly which syntax should be used one after another. I want to be like them. I want to code in my own way. My thoughts should be clear what I m going to do and I am to know coding syntax. So please help me.


Is there any rule to program? Or just to cram up in .NET with some fixed rules.
I want to program like I do solve mathematics problem by own, I don’t or rarely follow help book. If I follow math help book I understand what’s going on, how it’s solved. But in .NET I can not understand properly.
So in .NET where I will learn exactly what index should be used one after another. Kindly give me suggestions in simple way.

Regards.

Hasan Al Banna

What I have tried:

I want to be a good programmar in .NET (C#).

推荐答案

你认为编程就像数学 - 一个公式将是你的规则呢?不,这不是它的工作原理。

这更像是一门艺术,例如绘画。

你有你的工具(画布,钢笔,画笔 - 在编程中这将是编译器,语言,硬件......)。你有自己的技能(绘画课,绘画技术,等等......)这就像你的编程经验。然后有一个要求:就像有人告诉你请画一幅这房子的照片 - 如果你聘请10位画家画同一栋房子,结果会怎样?非常不同我猜...

你看到的规则是:

1.每一个值得写的软件都是非平凡的(如果不是这样的话)然后软件很可能用工具建模 - 想想Excel或类似的东西。)

2.每个要求都转化为选择正确的工具集和语言(对于画家来说,这是相同的,如果你告诉他:请给这面墙涂漆,他不会用铅笔做,但是用防水颜色等等)

3.编程的艺术是要提出足够好的表示您的软件正在解决的现实世界问题。这是风格和经验可以发挥最大作用的地方。风格很好,可以减少思维,让自己摆脱常见的陷阱和错误。经验很快找到正确的方式更快......



你的问题让我记得我的母亲 - 当她拿到她的第一台电脑(几年前) ,她想写下完成任务所需的所有步骤(写电子邮件等) - 这是绝望的。我告诉她不要害怕做错事(我备份了所有东西),只需点击arround然后尝试。只是她对未知的恐惧阻止她进行实验 - 现在她出色地擅长计算机,顺便说一句......

所以我建议你做一些与编程类似的事情:编写代码,调试!DEBUG!DEBUG!看看幕后发生了什么,了解计算机,算法,技术的基础知识...阅读代码(开源项目,文章) - 当你最终发现没有规则要遵循时,你的代码就是发明,就像一件独特的艺术品......回到这里,帮助下一代;)
You think programming is like math - a formula would be your "rule" then? No, that's not how it works.
It's more like an art, e.g. painting.
You have your tools (canvas, pens, brushes - in programming this would be compilers, languages, hardware...). You have your skills (drawing class, painting tech, whatever..) this is like your progamming experience. Then comes a requirement: Like someone tells you please paint a picture of this house - what will the outcome look if you hire 10 painters to paint the exactly same house? Very different I'd guess...
You see the rules are:
1. Every software that is worth writing is non-trivial (if this is not the case then the Software can likely modelled with a tool - think about Excel or something like this).
2. Every requirement translates to a selection of a correct toolset and language (this is the same for a painter, if you tell him: please paint this wall, he will not do it with a pencil but with water-resistant colors and so on)
3. The art in programming is to come up with a good enough representation of the real world problem that your Software is solving. This is where style and experience can make the most difference. Style is good to lessen thinking and to free yourself from common pitfalls and mistakes. Experience is good to find the "right" way a little faster...

Your question remembers me to my mother - when she got her first computer (years ago), she wanted to write down all needed "steps" to complete a task (write email, etc.) - it was hopeless. I told her not to fear making something wrong (I backuped everything), just click arround and try. It was just her "fear" of the unknown stopping her to experiment - Now she is surprisingly good at Computers, btw...
So I would suggest you do something similar with programming: write Code, debug!DEBUG!DEBUG!!! to see what's going on under the hood, learn about the basics of computers, algorithms, technologies... read code (open source projects, articles) - And when you finally find out there was no rule to follow, your code is an "invention", like an unique piece of art... Come back here and help the "next generation" ;)


作为程序员 [ ^ ]



编辑==================


我不知道为什么这会被低估。它回答了OP关于如何成为优秀程序员的大部分问题。
Being a Programmer[^]

EDIT==================

I'm not sure why this was down-voted. It answers most of the OP's question on how to be a good programmer.


你好



首先,你必须尽可能使用.NET中的Client-Side HTML控件。它会减少交易时间。因此,对于文本,图像,按钮,链接等,如果可能,请使用HTML标记和控件。



秒,很简单。就像你想要找到的东西一样,你会用它的地址来称呼它,如:第三个房间内,第二个储物柜内,音乐CD下面。因此在编程时需要访问对象时,需要为其设置地址。例如,当你想为控件设置一个值时,你需要以下面的形式解决它:control.property:Image1.Visible = true。

或者如果你想访问一个方法,你需要像这样编码:

class.method:Path.GetExtension()或console.readkey();



它是你会因为编码而学习。

希望我能帮助你



最好的问候
Hello

First of all, you have to use HTML controls for Client-Side in .NET as much as you can. it will reduce the transaction time. So for text, images, buttons,links and etc, use HTML tags and controls if possible.

second, it is simple. like when you want to find something, you will call it by it's address, like : Inside 3rd room, inside 2nd locker, under the music CD. so in programming when need to access an object, you need to set the address for it. for example when you want to set a value for a control, you need to address it in the form: control.property : Image1.Visible = true.
or if you want to access a method, you need to code like it :
class.method : Path.GetExtension() or console.readkey();

it is something that you will learn due to coding.
hope I could help you

best regards


这篇关于我希望成为.NET(C#)的优秀程序员。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆