streamreader add to array

  • (2 Pages)
  • +
  • 1
  • 2

23 Replies - 1098 Views - Last Post: 11 June 2019 - 07:50 PM Rate Topic: -----

#16 andrewsw   User is online

  • never lube your breaks
  • member icon

Reputation: 6798
  • View blog
  • Posts: 28,100
  • Joined: 12-December 12

Re: streamreader add to array

Posted 10 June 2019 - 03:09 AM

Good.

If Spara is a List<string> then you do not need to convert each of its items to a string, a similar point was made by Skydiver.
Was This Post Helpful? 0
  • +
  • -

#17 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6968
  • View blog
  • Posts: 23,684
  • Joined: 05-May 12

Re: streamreader add to array

Posted 10 June 2019 - 10:04 AM

Realme: Please stop opening new threads about essentially the same problem/code base. It looks like you've opened about 4 threads about the same code base where you are trying to read in a text file line by line, parse each line, and then currently display its parts. I foresee the next problem you are going to encounter are steps 4 and 5 of your assignment:

View PostRealme, on 10 June 2019 - 08:23 AM, said:

4 Use every saved vector to create a book
5. Save books in a booklist


If you really want to open new threads focused on specific problems, then create one with the minimal amount of code needed to reproduce the problem you are encountering. Maybe your 150 IQ can't handle long threads like the "stable genius" in the US White House who can only deal with single page presentations with bullet points, and who believes that the Moon is part of Mars.
Was This Post Helpful? 0
  • +
  • -

#18 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: streamreader add to array

Posted 10 June 2019 - 10:06 AM

Hi skydiver. I am finished with this part long time ago
Was This Post Helpful? 0
  • +
  • -

#19 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: streamreader add to array

Posted 10 June 2019 - 10:14 AM

You should delete this and not the other thread
Was This Post Helpful? -2
  • +
  • -

#20 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6968
  • View blog
  • Posts: 23,684
  • Joined: 05-May 12

Re: streamreader add to array

Posted 10 June 2019 - 10:24 AM

A long time ago? Really? In your closed thread as of an hour ago you said:

View PostRealme, on 10 June 2019 - 11:58 AM, said:

I still seem to not be able to find how to type it out, you have any suggestions?

You would need to be able to "type it out" to be able to pass the correct parameters to each of the Bok constructors.

Also, it seems like as of 2 days ago, you still had not yet figured out how to create concrete descendant classes of Bok from another thread:

View PostRealme, on 08 June 2019 - 11:33 AM, said:

Hi,

I don't understand how this is supposed to be implemented when making "abstract class"

parts.Add(new Bok() { Serie = Console.ReadLine(), Titel = Console.ReadLine(), Novell = Utgivning.Novellsamling, Märke = Int32.Parse(Console.ReadLine()) });


I made "serie get set" method and it worked but how is "Bok" supposed to be added to "parts"

Was This Post Helpful? 0
  • +
  • -

#21 h4nnib4l   User is offline

  • The Noid
  • member icon

Reputation: 1399
  • View blog
  • Posts: 1,989
  • Joined: 24-August 11

Re: streamreader add to array

Posted 10 June 2019 - 11:19 AM

*
POPULAR

The recurring theme here is that you are convinced that you are so much smarter than everyone else that you ignore everything said about how to solve the problem (whether by us here or the author(s) of your coursework books). Meanwhile, you are making many very fundamental mistakes about how to use the language, how to perform Object-Oriented Programming, how to interact with user input, and on and on. You may be smarter than the people around you in your life (and maybe not), but this industry is full of brilliant people, and you are going to fail miserably if you don't find some intellectual humility. Case in point - you're continuing on into more complex concepts when you still think that an Author should inherit from a Book. In fact, I haven't seen you implement any of the recommendations anyone has given you, beyond the specific line(s) of code you believe you're having problems with.

As you've noticed, your threads are getting closed, and that's only going to increase in frequency if you don't start putting in more work on your end before you post. We're here to nudge you in the right direction, not help you with every part of your homework assignments. You seem to be working several chapters ahead of where your understanding really is, and the longer you wait to go back and learn the stuff you've skipped over, the worse the problem is going to get. What do you think is going to happen when you try to model an entire library system, complete with books, librarians, customers, indexing systems, check-in/check-out systems, etc., when you still think that public class Forfattare : Bok is valid? I can promise you that there's no amount of help a forum can give that will get you there if you haven't put in the time on your own to learn.

That's the fundamental problem with your questions right now - it's not that we don't want to help you, but it's obvious that you haven't learned the things you should already know to write the code you're trying to write, and you blow us off when we tell you to read your book. We volunteer here because we enjoy helping people, we enjoy engaging with each other on problems, and we see value in investing in the future of our industry. What we do not see value in is enabling students to get through their programming classes without learning, because that is a bad investment. You need to devote some serious time to working back up to this point in your learning. We're happy to help along the way, provided that your goal is clearly to learn the lesson being taught, rather than just complete the assignment to turn in.
Was This Post Helpful? 5
  • +
  • -

#22 Realme   User is offline

  • D.I.C Head

Reputation: -9
  • View blog
  • Posts: 147
  • Joined: 22-May 19

Re: streamreader add to array

Posted 10 June 2019 - 11:04 PM

Hi thanks Hannibal. Day before yesterday I created my first windows application and yesterday night I got finished.

Regards
Was This Post Helpful? 0
  • +
  • -

#23 h4nnib4l   User is offline

  • The Noid
  • member icon

Reputation: 1399
  • View blog
  • Posts: 1,989
  • Joined: 24-August 11

Re: streamreader add to array

Posted 11 June 2019 - 12:30 PM

What does that have to do with any of the things that I just said? Did you take anything away from my comment at all?
Was This Post Helpful? 0
  • +
  • -

#24 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6794
  • View blog
  • Posts: 31,354
  • Joined: 10-May 07

Re: streamreader add to array

Posted 11 June 2019 - 07:50 PM

No. He's not here to learn, he's here to post. To show off how weird, to show off how stubborn. He's not here to communicate, he's here to project.

What you wrote was valuable, meaningful, & time invested from experience & from observation. Unfortunately it fell on deaf & ignorant ears.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2