Click here to Skip to main content
15,909,827 members
Home / Discussions / C#
   

C#

 
Questionusing ReflectionPermission to access Protected members? Pin
LongRange.Shooter16-Aug-04 9:00
LongRange.Shooter16-Aug-04 9:00 
GeneralDrop Down List within a Template Column footer in a DataGrid Pin
spaskewitz16-Aug-04 8:51
spaskewitz16-Aug-04 8:51 
Generallogging on desktop Pin
mathon16-Aug-04 7:28
mathon16-Aug-04 7:28 
GeneralRe: logging on desktop Pin
Dave Kreskowiak17-Aug-04 4:52
mveDave Kreskowiak17-Aug-04 4:52 
GeneralRe: logging on desktop Pin
mathon17-Aug-04 7:45
mathon17-Aug-04 7:45 
GeneralRe: logging on desktop Pin
Dave Kreskowiak18-Aug-04 8:37
mveDave Kreskowiak18-Aug-04 8:37 
GeneralUsing piped function parameters and properties Pin
MrEyes16-Aug-04 7:22
MrEyes16-Aug-04 7:22 
GeneralRe: Using piped function parameters and properties Pin
Dave Kreskowiak17-Aug-04 4:48
mveDave Kreskowiak17-Aug-04 4:48 
Those values are not "piped" as you call it, it's the C# OR operator. They're just bit flag values OR'd together to come up with a composite value. All the constants are usually defined in an enum or are public constants in your class. For instance if the values of the constants your provided in your example were:
public class AnchorTest
{
    enum AnchorStyles
    {
        Bottom = 0x0001;
        Right  = 0x0002;
        Left   = 0x0004;
        Top    = 0x0008;
    }
}

Your property would then take a parameter and/or return a parameter of type AnchorStyles:
public class AnchorTest
{
    private AnchorStyles m_AnchorStyle;

    enum AnchorStyles                  // default data type is int.
    {
        Bottom = 1,
        Right  = 2,
        Left   = 4,
        Top    = 8
    }

    public AnchorStyles AnchorStyle
    {
        get { return m_AnchorStyle; }
        set { m_AnchorStyle = AnchorStyle; }
    }
}

Now, when you OR, or '|' your values together, you'll get the values added together. 1 OR 2 will equal 3, 1 OR 4 will equal 5, 1 OR 2 OR 4 OR 8 will equal 15.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

QuestionAxWebBrowser - create a document on the fly? Pin
Radoslav Bielik16-Aug-04 6:57
Radoslav Bielik16-Aug-04 6:57 
AnswerRe: AxWebBrowser - create a document on the fly? Pin
MrEyes16-Aug-04 7:11
MrEyes16-Aug-04 7:11 
GeneralRe: AxWebBrowser - create a document on the fly? Pin
Mr. Rogers16-Aug-04 8:32
Mr. Rogers16-Aug-04 8:32 
GeneralRe: AxWebBrowser - create a document on the fly? Pin
Nick Parker16-Aug-04 9:56
protectorNick Parker16-Aug-04 9:56 
GeneralRe: AxWebBrowser - create a document on the fly? Pin
Radoslav Bielik16-Aug-04 10:41
Radoslav Bielik16-Aug-04 10:41 
GeneralRe: AxWebBrowser - create a document on the fly? Pin
Judah Gabriel Himango16-Aug-04 10:52
sponsorJudah Gabriel Himango16-Aug-04 10:52 
GeneralReading the memory of a process Pin
Wjousts16-Aug-04 6:03
Wjousts16-Aug-04 6:03 
GeneralRe: Reading the memory of a process Pin
Nick Parker16-Aug-04 6:23
protectorNick Parker16-Aug-04 6:23 
GeneralRe: Reading the memory of a process Pin
Wjousts16-Aug-04 11:12
Wjousts16-Aug-04 11:12 
GeneralRe: Reading the memory of a process Pin
Nick Parker16-Aug-04 11:30
protectorNick Parker16-Aug-04 11:30 
GeneralRe: Reading the memory of a process Pin
leppie17-Aug-04 1:15
leppie17-Aug-04 1:15 
GeneralRe: Reading the memory of a process Pin
Wjousts17-Aug-04 7:46
Wjousts17-Aug-04 7:46 
GeneralRe: Reading the memory of a process Pin
Roman Rodov16-Aug-04 14:40
Roman Rodov16-Aug-04 14:40 
GeneralRe: Reading the memory of a process Pin
Wjousts17-Aug-04 8:00
Wjousts17-Aug-04 8:00 
Generalsetting Printer Dpi Pin
htafc16-Aug-04 5:25
htafc16-Aug-04 5:25 
Generala reflection question... Pin
LongRange.Shooter16-Aug-04 5:20
LongRange.Shooter16-Aug-04 5:20 
GeneralRe: a reflection question... Pin
Nick Parker16-Aug-04 5:43
protectorNick Parker16-Aug-04 5:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.