C# Homework
Dec 6 2008, 2:11 am
By: ClansAreForGays  

Dec 6 2008, 2:11 am ClansAreForGays Post #1



Situation: I have 1 more homework assignment left in my C# class. This one deals with File streams. I have until 12 tonight EST to turn it in.

Dilemma: I've been playing Temple Siege.


Assignment Requirements: [attach=2158] (so that it doesn't showup in google search)

Solution: Here's what I have done so far. [attach=2159]


SEN is not your personal army, but it can be a miracle.




Dec 6 2008, 2:14 am ClansAreForGays Post #2



Would it help if I posted the streaming video of the solution?




Dec 6 2008, 2:15 am Matt Burch Post #3



If you think you're expecting us to do your homework for you while you play Temple Siege then I suggest you to think again.
If you were a little more specific of what you need help with, I might be able to post some info. Sucks that I don't have Windows XP running on my laptop anymore.



None.

Dec 6 2008, 2:27 am ClansAreForGays Post #4



Quote from Matt Burch
If you were a little more specific of what you need help with, I might be able to post some info.
No, I want you to do it for me.




Dec 6 2008, 2:43 am Matt Burch Post #5



The C# you are doing is specifically Windows Programming, not the C# mac version. I can be of no help without my Virtual Machine running. If I had a Windows XP install disc and or a serial number I could help.



None.

Dec 6 2008, 3:29 am cheeze Post #6



No you wouldn't Matt. Tell CAFG to go fail his class.



None.

Dec 6 2008, 3:36 am ClansAreForGays Post #7



Alright Alright.













... I'll give pix.




Dec 6 2008, 3:45 am Oyen Post #8



I know all about File Streams for C++. If I knew C# instead of C++, I gladly would have helped you. But Alas... :-_-:

Post has been edited 1 time(s), last time on Dec 6 2008, 3:53 am by Oyen.



None.

Dec 6 2008, 4:30 am ClansAreForGays Post #9



Starting to get the hang of it, but I don't think I'll be done by 12 :{




Dec 6 2008, 4:47 am Matt Burch Post #10



Post your code on pastebin.com and I'll see if I can help out at all.

I couldn't get filestreaming working properly with C++ in high school, so I don't know how much help I'll be, but I'll give it a shot.
What program are you told to be using?



None.

Dec 6 2008, 5:34 am ClansAreForGays Post #11



SaveFileDialog dialogNew = new SaveFileDialog();// my save dialog box stuff
dialogNew.CheckFileExists = false;//lets me make a new file (i think)

StreamWriter outStream2 = File.CreateText("c:\\temp\\" + dialogNew.FileName);//here's where I get an exception. Here I'm trying to make a test.txt file.

here I'm trying to make a text file in C:\temp\ but when I go to save, it says "The given path's format is not supported." It only seems to work when I have a file already created with the same name. I need to create a new file from nothing.




Dec 6 2008, 5:49 am ClansAreForGays Post #12



I thought I fixed it but I'm still getting the same error.
It's now:

FileStream output = new FileStream("c:\\temp\\" + dialogNew.FileName,FileMode.CreateNew, FileAccess.Write);




Dec 6 2008, 5:51 am ClansAreForGays Post #13



What's the difference between FileStream and streamWriter?




Dec 6 2008, 6:03 am A_of-s_t Post #14

aka idmontie

Are you using Visual C#? Becuase if you are, there's this nifty thing called tab that brings up an AWESOME box with all the stuff you can use. That was pretty much the point of making VISUAL C#, so that its pretty much idiot proof to code something.

As for your actual assignment, I COULD help you, but then again, why should I?



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Dec 7 2008, 5:07 am ClansAreForGays Post #15



Cuz you want hawt cafg pix?




Dec 7 2008, 5:13 am Matt Burch Post #16



I'll do this for you right now. I'll use Java and Swing instead of C#, though. :lol:



None.

Dec 7 2008, 6:05 am ClansAreForGays Post #17



I think I could do something with that, and I'd be learning it while trying to make it work for C#.




Dec 7 2008, 6:11 am ClansAreForGays Post #18





I have to make all those buttons do what they say.




Dec 7 2008, 7:09 am Matt Burch Post #19



I used NetBeans cuz i'm too lazy to do it all in BlueJ at the moment.
JAVA CODE: http://pastebin.com/m41a9bf91
Design: http://machost.exofire.net/design.png

I just used one window, because I didn't feel like making a popup window.

Whoops, didn't do the "Next Score" part yet, by opening the files.. Whatever, you can figure that one out yourself.



None.

Dec 7 2008, 7:54 pm A_of-s_t Post #20

aka idmontie

You really shouldn't do his homework for him... If I were a moderator of this forum, I would have actually closed this topic.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
Please log in to shout.


Members Online: IlyaSnopchenko, Roy, jun3hong