Home

Asc, Chr, AscW, ChrW giving error "not declared".

edited August 27

I'm trying to test a VB Program in LINQPad v8.5.5 x64. For whatever reason, I'm not able to use Asc, AscW, Chr, or ChrW.

They all give the same error "... is not declared. It may be inaccessible due to its protection level." (Error code BC30451)

What am I doing wrong with LINQPad that these functions are missing?

Example Code:

Sub Main
    Const TestChar As Char = "A"c
    Dim myInt As Integer = Asc(TestChar)
    Dim myInt2 As Integer = AscW(TestChar)

    Const TestInt As Integer = 65
    Dim myChar As Char = Chr(TestInt)
    Dim myChar2 As Char = ChrW(TestInt)
End Sub

Comments

Sign In or Register to comment.