Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
QuestionAppend to file that is in use? Pin
sheldons12-Aug-11 6:15
sheldons12-Aug-11 6:15 
AnswerRe: Append to file that is in use? Pin
SledgeHammer0112-Aug-11 6:47
SledgeHammer0112-Aug-11 6:47 
AnswerRe: Append to file that is in use? Pin
jschell12-Aug-11 8:20
jschell12-Aug-11 8:20 
AnswerRe: Append to file that is in use? Pin
Roger Wright12-Aug-11 19:29
professionalRoger Wright12-Aug-11 19:29 
AnswerRe: Append to file that is in use? Pin
jschell13-Aug-11 7:01
jschell13-Aug-11 7:01 
AnswerRe: Append to file that is in use? Pin
Oludayo Alli16-Aug-11 4:20
Oludayo Alli16-Aug-11 4:20 
AnswerRe: Append to file that is in use? Pin
RichardGrimmer17-Aug-11 5:46
RichardGrimmer17-Aug-11 5:46 
QuestionC# OOP Question: Best way to setup these classes? Pin
Goalie3512-Aug-11 4:46
Goalie3512-Aug-11 4:46 
I'm somewhat new to OOP & having a little trouble setting up some classes. Here's a quick little background on my project:
--------------------------------------------
Basically, I need to create some objects for working with excel similar to that of the excel objects within the "Microsoft Office Object Library" (I'm using the ms open xml sdk kit, which seems to require a little more work than the ms object library). In particular, I'm looking to create 3 objects:
-Workbook
-Worksheet
-Range

-My Workbook class would contain methods such as "OpenWorkbook" and "Save".
-My Worksheet class would contain methods such as "OpenWorksheet", "InsertWorksheet", and "CopyWorksheet".
-My Range class would take a range of cells and contain methods for formatting that range such as "FontColor", "FontSize", etc.
-----------------------------------------------------

My issue:
I need to pass around properties from object to object but unsure on how to do so in the cleanest fashion. For example, within my Workbook class, I declare the following property:
public WorkbookPart WbPart { get; set; }

I will then need to use this "WbPart" property within my Worksheet class. For example, to insert a new worksheet, I need to use the following:
WbPart.AddNewPart<worksheetpart>();

My question
What's the best way to pass around these properties from class to class? Should I create a base class for this or something, and if so, how would I create this base class (I'm unfamiliar with base classes)?

Thanks.
AnswerRe: C# OOP Question: Best way to setup these classes? Pin
BobJanova12-Aug-11 6:00
BobJanova12-Aug-11 6:00 
GeneralRe: C# OOP Question: Best way to setup these classes? Pin
Shameel12-Aug-11 6:06
professionalShameel12-Aug-11 6:06 
Questionload big image in program Pin
Mohsen Shahindust12-Aug-11 4:24
Mohsen Shahindust12-Aug-11 4:24 
AnswerRe: load big image in program Pin
Blue_Boy12-Aug-11 4:31
Blue_Boy12-Aug-11 4:31 
GeneralRe: load big image in program Pin
Matt Meyer12-Aug-11 4:39
Matt Meyer12-Aug-11 4:39 
GeneralRe: load big image in program Pin
Mohsen Shahindust12-Aug-11 5:01
Mohsen Shahindust12-Aug-11 5:01 
AnswerWhat's the image for? Pin
MicroVirus12-Aug-11 4:43
MicroVirus12-Aug-11 4:43 
GeneralRe: What's the image for? Pin
Mohsen Shahindust12-Aug-11 5:07
Mohsen Shahindust12-Aug-11 5:07 
AnswerRe: load big image in program Pin
BobJanova12-Aug-11 6:06
BobJanova12-Aug-11 6:06 
GeneralRe: load big image in program Pin
MicroVirus12-Aug-11 8:36
MicroVirus12-Aug-11 8:36 
GeneralRe: load big image in program Pin
BobJanova12-Aug-11 8:43
BobJanova12-Aug-11 8:43 
GeneralRe: load big image in program Pin
MicroVirus12-Aug-11 8:55
MicroVirus12-Aug-11 8:55 
AnswerRe: load big image in program Pin
Oludayo Alli20-Aug-11 7:06
Oludayo Alli20-Aug-11 7:06 
Question1st year IT student seeking mentor Pin
Njabulo Mpungose12-Aug-11 3:40
Njabulo Mpungose12-Aug-11 3:40 
AnswerRe: 1st year IT student seeking mentor Pin
Not Active12-Aug-11 4:21
mentorNot Active12-Aug-11 4:21 
AnswerRe: 1st year IT student seeking mentor Pin
Blue_Boy12-Aug-11 4:22
Blue_Boy12-Aug-11 4:22 
AnswerRe: 1st year IT student seeking mentor Pin
OriginalGriff12-Aug-11 8:53
mveOriginalGriff12-Aug-11 8:53 

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.