C#中的对象和调用引用 [英] Object and call reference in C#

查看:330
本文介绍了C#中的对象和调用引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是类引用和类对象?

  class  AC; 
class BC;
AC b;
b = new BC();



plz EXP详情



我的尝试:



  class 演示
{
public static < span class =code-keyword> void Main()
{
BC b;

b = new TC();
b.Display();
}
}

解决方案

1。什么是类:类(C#编程指南) [ ^ ]



提取: 类是一种结构,它允许您通过将其他类型,方法和事件的变量组合在一起来创建自己的自定义类型。一个类就像一个蓝图。它定义了类型的数据和行为。



你需要找一本好的初学者书或者做一个在线课程来理解编程的核心。

what are the class reference and class object?

class AC;
class BC;
AC b; 
b= new BC();


plz EXP detail

What I have tried:

class Demo
{
  public static void Main()
  {
     BC b;

     b = new TC();
     b.Display();    
  }
}

解决方案

1. What is a class: Classes (C# Programming Guide)[^]

Extract: A class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and events. A class is like a blueprint. It defines the data and behavior of a type.

You need to find a good beginners book or do an online course to understand core of programming.


这篇关于C#中的对象和调用引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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