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
Duncan Lithgow
NA
5
1.1k
Is 'e' a method, a property or what?
Mar 5 2014 4:05 AM
In a piece of code as below what is 'e'? I thought that in C# all variables have to be declared, so it isn't a variable. Is 'e' a member of the Element class ( a property) ? I don't understand what is is or how it knows what it is... I don't see it being declared ... have I missed the lesson about how to declare a new method?
foreach
(Element e
in
new
FilteredElementCollector
(doc)
.
OfClass
(
typeof
(FamilyInstance)).
OfCategory
(BuiltInCategory.OST_Doors))
{
FamilyInstance fi = e
as
FamilyInstance;
FamilySymbol fs = fi.Symbol;
Family family = fs.Family;
info += family.Name +
": "
+ fs.Name +
": "
+ fi.Name + Environment.NewLine;
}
I appreciate that this is a beginner question, but I don't know where to look to fully understand this code.
And how is fi being declared, what type is it, and how does it know what type it is?
(this code uses the Autodesk Revit API)
Reply
Answers (
3
)
How to make a marker on google map based on database cities
MVC3