FourCC's
-
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! -
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!nfactorial wrote: private static const FourCC TEST_FOURCC( 'T', 'E', 'S', 'T' );
static const FourCC TEST_FOURCC = new FourCC( 'T', 'E', 'S', 'T' );
-
nfactorial wrote: private static const FourCC TEST_FOURCC( 'T', 'E', 'S', 'T' );
static const FourCC TEST_FOURCC = new FourCC( 'T', 'E', 'S', 'T' );
damn, so near and yet so far :) Thanks, n!