The bold line looks just like C#, except that in F# "typeof" takes angle brackets instead of round ones.

See also

[link:lorgonblog.spaces.live.com]

By on 2/5/2009 7:05 AM ()

When I tried to use IsDefined instance method,I got one error message.
The following is my fsharp code.

type LocalServiceAttribute =
inherit System.Attribute
static member IsLocalService serviceInterface:System.Type -> bool =
serviceInterface.IsDefined(typeof<LocalServiceAttribute>,false)

Error Message like this.
// Error 1 Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved C:\Users\Venus\Library1\Generic.fs

By on 2/7/2009 4:58 AM ()

Here's the syntax:

static member IsLocalService (serviceInterface:System.Type) : bool =

By on 2/7/2009 10:25 AM ()

Thank you

By on 2/5/2009 5:35 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper