Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Type.GetInterface Method

Type.GetInterface Method

Scheduled Pinned Locked Moved C#
csharpquestionhelpworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jinwah
    wrote on last edited by
    #1

    Ok with the help of this list I am getting somewhere with interfaces... But I have a little trouble with the C#/.NET reference documentation. My question What does the Type.GetInterface Method return if the type does not have the requested interface. The .NET documentation does not specify this in the methods documentation? Thanks for helping I am a bit green to this environment but I am getting there quickly with this site/list.

    H 1 Reply Last reply
    0
    • J Jinwah

      Ok with the help of this list I am getting somewhere with interfaces... But I have a little trouble with the C#/.NET reference documentation. My question What does the Type.GetInterface Method return if the type does not have the requested interface. The .NET documentation does not specify this in the methods documentation? Thanks for helping I am a bit green to this environment but I am getting there quickly with this site/list.

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Return Value

      A Type object representing the interface with the specified name, implemented or inherited by the current Type, if found; otherwise, a null reference (Nothing in Visual Basic).

      ...straight form the Type.GetInterface documentation. As a norm, methods that return reference types typically return null in cases like this, or just throw an exception if there's an error.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups