Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Topic author was deleted

    Apr 09, 2013 @ 19:58

    How do you get a list of data types that share a GUID?

    I need to loop through each instance of a particular data type.

    If I have dataType1 and dataType2 which are both instances of DataTypeDefinitionX, how do I get dataType1 and dataType2?

    I've tried this:

    DataTypeDefinition x = DataTypeDefinition.GetByDataTypeId(new Guid("c324dcd5-4f2a-482a-94cd-1608a86328d6"));

    The problem is this method only returns the FIRST instance instead of the specified GUID.  Intellisense help text says it returns a list, but it only returns a single DataTypeDefinition in stead of DataTypeDefinition[].

    Maybe I'm going about this all wrong.

    Suggestions needed.

     

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 09, 2013 @ 20:04
    Tom Fulton
    100

    Hi Kevin,

    Try this:

    var propertyEditorGuid = new Guid("...");
    var matches = DataTypeDefinition.GetAll().Where(d => d.DataType.Id == propertyEditorGuid);

    Hope this helps,
    Tom 

  • Comment author was deleted

    Apr 09, 2013 @ 20:34

    Brilliant!  Thx Tom +1 to you :)

Please Sign in or register to post replies

Write your reply to:

Draft