Welcome Guest Search | Active Topics | Members | Log In | Register

Command creating parameterized constructor initializing class fields Options · View
bzolka
Posted: Tuesday, August 05, 2008 4:11:29 AM
Rank: Newbie
Groups: Member

Joined: 8/5/2008
Posts: 1
Points: 3
Location: Hungary
Hi,

A command creating a parameterized constructor initializing all existing fields would be great. For example for class

public class Complex
{
double re;
double im;
}

the following constructor would be created:


public class Complex
{
double re;
double im;

public Complex(double re, double im)
{
this.re = re;
this.im = im;
}

}

This could save a lot of time if you have entity classes with a lot of fields.
Maybe there could be an alternatives creating constructors initializing fields/properties/both.

Alvaro
Posted: Wednesday, August 27, 2008 3:32:33 AM
Rank: Administration
Groups: Administration

Joined: 3/16/2008
Posts: 21
Points: 69
Location: Spain
Please, see the class command and you can figure it out how to modify it to acomplish what you say.

Thanks,

Alvaro
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008