Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6797623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:37:52+00:00 2026-05-26T18:37:52+00:00

In VB you can both define and assign a value to a variable in

  • 0

In VB you can both define and assign a value to a variable in one line.

Can you do this in Basic4Android?

VB code sample:

Dim strMyVariable As String = "Some text is in here"

Update:
I tried this and got the following error:

NumberOfColumns As Int = 5  ' Number of columns.

Compiling code.                         Error
Error compiling program.
Error description: '=' expected.
Occurred on line: 13
NumberOfColumns As Int = 5' Number of columns.
Word: numberofcolumns

Update:

Compiling code.                         Error
Error compiling program.
Error description: Syntax error.
Occurred on line: 13
Dim NumberOfColumns As Int = 5 ' Number of columns.
Word: int
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:37:53+00:00Added an answer on May 26, 2026 at 6:37 pm

    AFAICT, you can’t.

    If you really feel you need to do it on the same line, you can do it like this:

    Dim NumberOfColumns As Int: NumberOfColumns = 5
    

    The colon is defined in the user’s guide (page 111) as the “separator for two statements on the same line”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can both WPF and Windows forms controls be used within one application? How difficult
From what I learned, a MySQL MASTER server is one that can both read
It seems like both can be used to define functions that you can implement
Is this the proper way to define an include path for both *nix and
Help, I'm deperate..i can't continue my app because of this: I have setup one
So I create plop two gridviews onto page, define BOTH their datasources in code
I have two view controllers in a tabbar which can both edit data. Therefore,
I'm writing an app where a user can both create their own pages for
Is that possible? I mean, can both ends of the many to many relationship
I can get both System.Net.Mail and System.Web.Mail to work with GMail, but I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.