Reading Books and some C#

  • Thread starter Thread starter Worker
  • Start date Start date
W

Worker

Hi , i`ve been wondering how many days do you guys need to read an average
asp.net programming book, answer honestly please, for example 800 pages big,
how many pages a day? I just wanna see if i m reading too slow... :)



Next question, i have a simple function from my latest book here and the
authors of "Wrox Beginning Asp.net with c#" were not to eager to explain the
meanings of the theory of code they used in their example so i guess i
should figure it out on my own, maybe with the help from a good soul,
So there are some confusions in the function which i d appreciate being
clarified,

The code first...

<code>
private DateTime GetSafeDate(string proposedDate)
{
// Returns a non-null DateTime even if proposed date can't be parsed
DateTime safeDate;
try {
safeDate = DateTime.Parse(proposedDate,
DateTimeFormatInfo.InvariantInfo);
} catch (Exception e) {
Response.Write("<!-- Failed to parse date: " + e.Message + " -->");
safeDate = DateTime.MinValue;
}
return safeDate;
}
</code>

What i m confused about is the "DateTime.Parse" which seems like a property
of an object or something, i know DateTime is a type of variable but i m not
sure what this means here,

Also, the "DateTimeFormatInfo.InvariantInfo" is not too clear to me either,
do you have any idea?

Thats it,
Thanx!
 
Well, if I have nothing else going, I could probably go through a book that
size in about a week or two.

Having said that, you should not make determinations on how fast others
read. The real question is, do you understand what you are reading and can
you apply it. Although I may read the book quickly, I don't read with the
expectation that I will be an expert (in fact, I don't even try the sample
code). My goal is usually to get a high-level understanding of the
technology and how it interacts with other systems. This is so that I know
what tools are available to solve particular problems. Only when a problem
needs solving do I dive into more detail.

DateTime is a structure (similar to a class). Parse is a method that takes
a string value and converts it into a DateTime instance. Pretty much all
your datatype have a Parse method.

I have not done much with formatting, but generally formatting allows you to
specify the culture the string was formatted in. Each country has their own
delimiters. Now, looking at that example, I think that you could have
probably just run the Parse without the second parameter and received the
same results.
 
I% SAY :::
Hi , i`ve been wondering how many days do you guys need to read an average
asp.net programming book, answer honestly please, for example 800 pages big,
how many pages a day? I just wanna see if i m reading too slow... :)

not a lot, but i read a little bit each day
of the book, "c# class design, coding effective
classes". i think i know the basics of asp.net
web mechanics, i have programmed services, client
applications and console application, so now i
want to learn how to really design using OOP.

isn't that the poing of languages like c# and
java, to liberate us from the mechanics so we
can concentrate on design?

Next question, i have a simple function from my latest book here and the
authors of "Wrox Beginning Asp.net with c#" were not to eager to explain the
What i m confused about is the "DateTime.Parse" which seems like a property
of an object or something, i know DateTime is a type of variable but i m not
sure what this means here,

funny you should ask, because if you read
the book above you would know.

in the .Net framework, while there are many
'primitive' datatypes, the point of .Net is
that it supports many object datatypes, which
are not only datatypes but carry with them
methods and properties that apply to data and
that datatype.
 
I said:
funny you should ask, because if you read
the book above you would know.

Correct me if i m wrong but i have seen no explanation of DateTime.Parse in
the whole book.
I`ve read it, and i dont remember it being explained, i ve also searched the
index and theres no such
thing mentioned there either, i might be wrong though.
 
Having said that, you should not make determinations on how fast others
read. The real question is, do you understand what you are reading and can
you apply it. Although I may read the book quickly, I don't read with the


I agree with Peter. If yuu went by my answer, you would never finish
a book. :)

As Peter says, what you should do is take as long as you need to read
a book and understand the material as you go along. What is what
learning is all about.

I am studying for the 70-316 exam right now. I had planned originally
to take it this week, but things have changed. I need to do more
studying. :)
 
DateTime.Parse is a *static* method, meaning to call it you don't use an
instance of DateTime, but the DateTime class itself. DateTime.Parse takes a
String parameter and returns a DateTime (or throws an exception).

The InvariantInfo bit has to do with the culture. You want to use the
Invariant culture.
 
General said:
DateTime.Parse is a *static* method, meaning to call it you don't use
an instance of DateTime, but the DateTime class itself.
DateTime.Parse takes a String parameter and returns a DateTime (or
throws an exception).

The InvariantInfo bit has to do with the culture. You want to use the
Invariant culture.

Thank you General Protection Fault,


thank you all for assistance.
 
Back
Top