Results 1 to 5 of 5

Thread: Anything .NET

  1. #1

    Default Anything .NET


    Hi fellow Istoryans,

    I am starting this thread to discuss anything about MS .NET (C#, VB .NET, ASP .NET, AJAX .NET, .NET Web Services). Though this thread is pretty much general for now but we can probably categorize it later by creating another threads.

    iamweasel

  2. #2
    up.
    for .NET beginners.

  3. #3
    for beginners

    Code:
    List<Object> t = new List<Object>();
    Person p = new Person(Age=21, Name="iamweasel");
    t.Add(p);
    if( t.Contains( new Person(Age=21, Name="iamweasel") ) )
    {
     MessageBox.Show("really?");
    }
    else
    {
     MessageBox.Show("Ok you are");
    }
    onsa output?

  4. #4
    Quote Originally Posted by silent-kill View Post
    for beginners

    Code:
    List<Object> t = new List<Object>();
    Person p = new Person(Age=21, Name="iamweasel");
    t.Add(p);
    if( t.Contains( new Person(Age=21, Name="iamweasel") ) )
    {
     MessageBox.Show("really?");
    }
    else
    {
     MessageBox.Show("Ok you are");
    }
    onsa output?

    Person p = new Person(Age=21, Name="iamweasel"); <-- this is a typo and will result to an error

    Syntax for named properties is:

    Person p = new Person { Age = 21, Name = "iamweasel" };

    With the correct syntax, the output is :

    OK you are

  5. #5
    correct!

    its because its not comparing by value but by Instance.
    gi ikaw napud heheh

  6.    Advertisement

Similar Threads

 
  1. How did you know about istorya.net?
    By tikboy in forum General Discussions
    Replies: 998
    Last Post: 05-03-2020, 12:51 PM
  2. In iSTORYA.net, who is the Sweetest iStoryan and Why?
    By Diggle in forum General Discussions
    Replies: 1008
    Last Post: 06-28-2016, 06:01 PM
  3. The most intelligent istorya.net member and why?
    By d_lightt in forum General Discussions
    Replies: 259
    Last Post: 10-26-2012, 11:44 AM
  4. Replies: 1
    Last Post: 07-13-2006, 06:35 AM
  5. iSTORYA.NET Template Design Contest
    By BeoR in forum Websites & Multimedia
    Replies: 0
    Last Post: 09-11-2003, 12:31 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top