TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
james
NA
1.1k
334k
Looking for clarification on | operator
Dec 26 2003 9:05 AM
Okay, I've seen the pipe (|) used in instances where you want to assign multiple values to a property. A prime example of this is the Anchor property of the System.Windows.Forms.Control class. i.e... // Anchor the button to the bottom right corner of the form button1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right); This is setting two values for 1 property. I can not find any documentation on this, however. Both the MSDN and the C# Spec only refer to the pipe (|) as the bitwise OR operator, and does not reference anything about this use of it. Can someone clarify exactly how a property can have two values at the same time? Are there any articles on constructing custom classes using this type of device? thanks, -James
Reply
Answers (
3
)
Add Column to Access database using OleDB
MSDE vs. Access