question regarding C# division modulus

J

Jeff

hi

is the C# operator for division: /

and the modulus operator % ???

I've read c++ uses those (atleast my old c++ book has an example with those
operators), but not sure if C# has some better operators etc... I want to
use the division/modulus when developing wrapper for a class, I have a class
lets call it Car, So List<Car> creates a list of car objects, This list I
want to transform to a another list which contains 3 Cars on each level...
So I created a wrapper class which has 3 variables referecing 3 Car
objects.... So then use the division/modulus looping through List<Car>
creating the List<Wrapper>

any ideas?
 
J

Jeff

I'm trying to display informaton about 3 elements on a row in a GridView or
Repeater control, as far as I know in the RowDataBound event handler I can
only access 1 element each time, so that's why I thought about creating the
wrapper class holding reference to 3 objects, 3 elements in a row is a
reguirment the customer of the website have decided
 
I

Ignacio Machin ( .NET/ C# MVP )

hi

is the C# operator for division: /

and the modulus operator % ???

I've read c++ uses those (atleast my old c++ book has an example with those
operators), but not sure if C# has some better operators etc...  I wantto
use the division/modulus when developing wrapper for a class, I have a class
lets call it Car, So List<Car> creates a list of car objects, This list I
want to transform to a another list which contains 3 Cars on each level....
So I created a wrapper class which has 3 variables referecing 3 Car
objects.... So then use the division/modulus looping through List<Car>
creating the List<Wrapper>

any ideas?

Hi,

I'm not sure what the operators have to do with the rest of your post.
It sound more like if you need an enumerator that returns 3 elements
at a time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top