请帮助我解决此代码 [英] please help me to solve this code

查看:73
本文介绍了请帮助我解决此代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.codeproject.com/Articles/207797/Learn-MVC-Model-view-controller-Step-by-Step-in-7#Lab1:-%20Creating%20a%20simple%20hello%20world %20ASP.NET%20MVC%20Application


我现在从此链接学习mcv,我不知道下面的代码


Customer objCustomer = new Customer();
objCustomer.Id = 12;/////.Id这里是什么
objCustomer.CustomerCode ="1001";///什么是.CostomerCode在这里
objCustomer.Amount = 90.34;//这里是多少

返回View("DisplayCustomer",objCustomer);


请帮助我解决作为评论写的内容..

http://www.codeproject.com/Articles/207797/Learn-MVC-Model-view-controller-Step-by-Step-in-7#Lab1:-%20Creating%20a%20simple%20hello%20world%20ASP.NET%20MVC%20Application


i learning mcv from this link now i dont know abt below code


Customer objCustomer = new Customer();
objCustomer.Id = 12;/////What is .Id here
objCustomer.CustomerCode = "1001";///What is .CostomerCode here
objCustomer.Amount = 90.34;//What is Amount here

return View("DisplayCustomer",objCustomer);


please help me to solve which i write as comment..

推荐答案

嘿,

objCustomer是"Customer"类的实例. .Id,客户代码和金额是该类中的属性/属性...

客户类别可能看起来像这样.

Hey,

objCustomer is an instance of the ''Customer'' class. the .Id, customer code and amount are properties/attributes inside that class...
i.e.
the customer class might look like this.

public class Customer()
{
    public int id { get; set; }
    public string CustomerCode { get; set; }
    public float id { get; set; }
}



如果您在Visual Studio中查看此代码,请右键单击"Customer()",然后单击转到定义"
您应该会看到在那里所需的所有内容.



if your viewing this code in visual studio, right click on ''Customer()'' and click ''Go to definition''
you should see everything u need to there.


示例"一词对您来说意味着什么吗?
Does the word "Example" mean anything to you?


这篇关于请帮助我解决此代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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