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. FourCC's

FourCC's

Scheduled Pinned Locked Moved C#
csharpquestionannouncement
3 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.
  • N Offline
    N Offline
    nfactorial
    wrote on last edited by
    #1

    Does anyone have a FourCC class wrapper available? I'm new to C# so I'm not sure if I'm doing something wrong. I'd basically like to have a number of predefined types that I can use within my class, I've currently tried the following: namespace MyNamespace { public class MyClass { private static const FourCC TEST_FOURCC( 'T', 'E', 'S', 'T' ); } } Where 'FourCC' is a struct I've defined which accepts four values. The compiler moans at this though (cannot specify constructor arguments in declaration). As I'm new to C# is there something I've missed? It'd be great if I could just define them as an enum or uints (I've tried "private static uint TEST_FOURCC = 'TEST';" but it moans about too many characters in literal), I've also tried looking for a standard version in the framework but no luck. Thanks, n!

    L 1 Reply Last reply
    0
    • N nfactorial

      Does anyone have a FourCC class wrapper available? I'm new to C# so I'm not sure if I'm doing something wrong. I'd basically like to have a number of predefined types that I can use within my class, I've currently tried the following: namespace MyNamespace { public class MyClass { private static const FourCC TEST_FOURCC( 'T', 'E', 'S', 'T' ); } } Where 'FourCC' is a struct I've defined which accepts four values. The compiler moans at this though (cannot specify constructor arguments in declaration). As I'm new to C# is there something I've missed? It'd be great if I could just define them as an enum or uints (I've tried "private static uint TEST_FOURCC = 'TEST';" but it moans about too many characters in literal), I've also tried looking for a standard version in the framework but no luck. Thanks, n!

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      nfactorial wrote: private static const FourCC TEST_FOURCC( 'T', 'E', 'S', 'T' ); static const FourCC TEST_FOURCC = new FourCC( 'T', 'E', 'S', 'T' );

      leppie::AllocCPArticle(Generic DFA State Machine for .NET);

      N 1 Reply Last reply
      0
      • L leppie

        nfactorial wrote: private static const FourCC TEST_FOURCC( 'T', 'E', 'S', 'T' ); static const FourCC TEST_FOURCC = new FourCC( 'T', 'E', 'S', 'T' );

        leppie::AllocCPArticle(Generic DFA State Machine for .NET);

        N Offline
        N Offline
        nfactorial
        wrote on last edited by
        #3

        damn, so near and yet so far :) Thanks, n!

        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