hyuri: (Big eyes)
[personal profile] hyuri
next “probably a good idea” clean‑up: changing all the int.Parse( object.ToString() )s to Convert.ToInt32( object ), and similar conversions. likewise, changing all the C‑style (type)object to Convert.ToType( object ).

I’m actually slurring my speech. I think that means I should go to bed.

Date: 2004-09-20 11:19 pm (UTC)
From: [identity profile] 5hourhero.livejournal.com
I don't think it's counted as slurred if next to none of us know what you're talking about, anyway. ^_^ lol

This is interesting - are you making a program from scratch?

Date: 2004-09-21 03:36 am (UTC)
From: [identity profile] rizen.livejournal.com
Hyuri's working on LJ.NET. I don't think e made it from scratch, but rather took it over from a defunct project.

I also don't understand the benefit of not using C-style casts in C#. Does it provide some sort of optimization?

Date: 2004-09-21 07:58 am (UTC)
From: [identity profile] hyuri.livejournal.com
Consistency, mostly. It looks better to have one, common style of cast throughout the code, y’know? Besides, a bunch of the casts are unnecessary—e.g. using the ToString() method to get a string to pass to int.Parse(), rather than simply passing the object to Convert.ToInt32()—and if I look at all of them, I get to see whether they’re actually needed.

That, and it’s just easier to search for Convert.ToType().

Date: 2004-09-21 08:03 am (UTC)
From: [identity profile] rizen.livejournal.com
Makes sense.

Profile

hyuri: (Default)
hyuri

November 2014

S M T W T F S
      1
2345678
9101112131415
161718192021 22
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 22nd, 2026 11:36 pm
Powered by Dreamwidth Studios