| |

VerySource

 Forgot password?
 Register
Search
View: 866|Reply: 5

Continuous assignment?

[Copy link]

3

Threads

8

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-2-13 10:30:01
| Show all posts |Read mode
In C / JAVA:
Can use
int a, b, c;
a = 10;
c = b = a;
Assign a, b, and c to 10
But not at VB.net ~
The expression of b = a is not 10 and is false. . .
I think one by one assignment is too troublesome:
a = 10
b = a
c = b
--------
Is there any simple way to achieve this?
Reply

Use magic Report

0

Threads

11

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-12 15:00:01
| Show all posts
no
Reply

Use magic Report

0

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-4-14 16:15:01
| Show all posts
No
Reply

Use magic Report

1

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 Taiwan

Post time: 2020-4-16 14:45:01
| Show all posts
Unfortunately, this is the syntax of VB.NET.

In fact, there are advantages and disadvantages. The following situations reflect the advantages of VB.NET syntax:

C ++ / Java:
    int b;
    b = (a == c)? true: false;

VB.NET:
    Dim b As Boolean
    b = a = c
Reply

Use magic Report

2

Threads

29

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-4-17 19:00:01
| Show all posts
NO, there isn't
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-5-4 14:45:01
| Show all posts
Powerless
Start with the basics
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list