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 6061465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:56:28+00:00 2026-05-23T08:56:28+00:00

Ok, I asked this question and got excellent code example as answer. The code

  • 0

Ok, I asked this question and got excellent code example as answer. The code works but I don’t understand the meaning of the code. Can someone point the direction for me for further reading in order to understand the code. Here is the code that retrieves the checked radio button in a groupbox:

Dim rButton As RadioButton = GroupBox1.Controls _
    .OfType(Of RadioButton)() _
    .Where(Function(r) r.Checked = True) _
    .FirstOrDefault()

Ok, the parts that I don’t understand are .OfType, .Where, .FirsrOrDefault

UPDATE:

Thanks guys, those things are LINQ

  • 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-23T08:56:28+00:00Added an answer on May 23, 2026 at 8:56 am

    This code selects the first checked radio button in a group of buttons. Lets walk through the code:

    1. Dim rButton As RadioButton = GroupBox1.Controls _

      Select the group of form controls

    2. OfType(Of RadioButton)() _

      But only the Radio buttons from that group

    3. Where(Function(r) r.Checked = True) _

      That are already checked

    4. .FirstOrDefault()

      Return the first one or NULL if none are checked.

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

Sidebar

Related Questions

I asked this question yesterday got a pretty good answer but can't figure out
Previously I asked this question and got back this BeautifulSoup example code, which after
I asked this question and got an excellent answer (thanks!). Part of the problem
I've asked this question on Wikipedia's Reference Desk , but got no answer. On
(I asked this question in another way , and got some interesting responses but
I originally asked this question on RefactorMyCode , but got no responses there... Basically
Yesterday, I asked this question and never really got an answer I was really
I asked a question earlier , and got an excellent response, but, being a
I asked this question before and got a great working answer. what is the
I asked this similar question and got a satisfactory answer. However, doing the same

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.