Is there perhaps a single statement that will do the job ?

Public Class Polis
Public Nr As String

Public Fonds As String
Public KBR As String
Public Land As String
Public Usplit As String
Public Tcode As String
Public Reels As Integer

Public BELBON(40) As Double
Public BELEBON(40) As Double
Public BELTBON(40) As Double
Public SPABTOTB(40) As Double
Public ABE1(40) As Double
Public ABDAT1(40) As String
Public BBONJR(40) As String

Public SPABcalc(40) As Double
Public BELEcalc(40) As Double
Public BELcalc(40) As Double


End Class

You would need to use reflection to get a PropertyInfo[] array of the class's properties, then loop through, testing for CanWrite = true then use SetValue depending on SystemType with a switch statement perhaps.

Check this out:

http://articles.techrepublic.com.com/5100-3513-6099345.html

But in a single statement ? No I don't think that could be done. Other than to just create a new instance of the class.

Polis polis = new Polis()
Polis.Fonds = "Fonds value";
.
.
etc.

polis = new Polis();

First instance of polis is now orphaned on the heap where it will remain until Garbage Collector cleans it up...You Hope :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.