DEV Community

asilbek ibragimov
asilbek ibragimov

Posted on

1 1 1 1 1

11. Value Type va Reference Type (Complex Examples)

11. Value Type va Reference Type (Complex Examples)

a) Quyidagi kodning natijasini ayting va tushuntiring:

int x = 10;
int y = x;
y = 20;
Console. WriteLine (x);
Enter fullscreen mode Exit fullscreen mode

b) Quyidagi kodning natijasini tushuntiring:

class Person
{
    public string Name;
    class Program
    {
        static void Main(string|) args)
        {
            Person p1 = new Person();
            p1. Name = "Alice" ;
            Person p2 = p1;
            p2. Name = "Bob" ;
            Console. WriteLine(p1 .Name) ;
        }
    }
}
Enter fullscreen mode Exit fullscreen mode

Javoblari: **
**a) Javob: 10.

b) Javob: Alice;

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more