Article View: borland.public.csharpbuilder.multimedia
Article #1Pointing to a different structure
From: Joe Gabriele
Date: Wed, 29 Mar 2006 11:47
Date: Wed, 29 Mar 2006 11:47
37 lines
1627 bytes
1627 bytes
Hello,
I am new to C# and the C family in general, having used Delphi for many
years. I am trying to figure out how to have an element of a buffer array
use a different structure than it's original.
Example:
I have these two declarations
public class MyStructure
{
public ushort element1;
public ushort element2;
public uint element3;
}
and
private BufferDescription d = new BufferDescription();
How would I now have d.Format point to MyStructure so that it uses the
elements in MyStructure instead of the elements in d.Format?
I have tried:
MyStructure mns = new MyStructure();
d.Format = mns;
and get the error that I cannot implicitly convert one to the other.
What am I doing wrong?
Thanks.
Joe Gabriele
Technical Details
Message-ID:
<442a73c4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 21671d,465a433e4cb87aef,start X-Google-Attributes: gid21671d,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Joe Gabriele" <SORRY@TOO.MUCH.SPAM> Newsgroups: borland.public.csharpbuilder.multimedia Subject: Pointing to a different structure Date: Wed, 29 Mar 2006 06:47:15 -0500 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 NNTP-Posting-Host: 70.48.55.170 Message-ID: <442a73c4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1143632836 70.48.55.170 (29 Mar 2006 03:47:16 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail