Web Log di Adrian Florea

"You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." Antoine de Saint-Exupery
posts - 440, comments - 2715, trackbacks - 3944

My Links

Archives

Post Categories

Image Galleries

.RO Blogs

.RO People

.RO Sites

Blogs

Furls

Links

vinCitori

Quiz Sharp 28

using System;

struct Foo
{
  public double Value;

  public Foo(double d)
  {
    Value = Double(d);
  }

  private double Double(double d)
  {
    return 2 * d;
  }
}

class Test
{
  static void Main()
  {
    Foo f = new Foo(1);
    Console.WriteLine(f.Value);
    Console.Read();
  }
}

Quale tra le seguenti parole chiave si deve aggiungere al codice qui sopra per renderlo compilabile senza errori:

  • A. static (per avere: private static double Double(double d))
  • B. new (per avere: Value = new Double(d);)
  • C. this (per avere: Value = this.Double(d);)

Print | posted on domenica 20 giugno 2004 19:04 | Filed Under [ Quiz Sharp ]

Powered by:
Powered By Subtext Powered By ASP.NET