# Problems with nt = Boolean.ToString(tbln)

**URL:** <https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233>\
**Category:** Getting Started\
**Created:** [March 24, 2021, 1:06pm UTC](https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233 "2021-03-24T13:06:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arthur\_Gabhart](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@Arthur\_Gabhart](https://forum.xojo.com/u/Arthur_Gabhart)\
**Post date:** [March 24, 2021, 1:06pm UTC](https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233/1 "2021-03-24T13:06:23Z")

</div>

desktop & current version

nt is string. tbln and QzTmpBool() are boolean.  
I am getting this analyzer error I don’t understand.

Static reference to extension method: call this on a value of type Boolean.  
`nt = Boolean.ToString(tbln)`

I tried previously  
`nt = Boolean.ToString(QzTmpBool(i))`

What is wrong with my code?

I also tried and realized it probably wouldn’t work when the error showed up.  
temp() is string

`temp = string.fromarray(Boolean.ToString(QzTmpBool))`

---

<div class="post-metadata">

**Author:** ![Ulrich\_Bogun](https://forum.xojo.com/user_avatar/forum.xojo.com/ulrich_bogun/32/1864_2.png) [@Ulrich\_Bogun](https://forum.xojo.com/u/Ulrich_Bogun)\
**Post date:** [March 24, 2021, 1:14pm UTC](https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233/2 "2021-03-24T13:14:15Z")

</div>

How about tbln.ToString?

(Boolean.ToString is not a class/shared method. You have to use it on a Boolean variable)

---

<div class="post-metadata">

**Author:** ![Arthur\_Gabhart](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@Arthur\_Gabhart](https://forum.xojo.com/u/Arthur_Gabhart)\
**Post date:** [March 24, 2021, 1:40pm UTC](https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233/3 "2021-03-24T13:40:24Z")

</div>

Thanks.  
When I looked at the LR before, I expected to find Boolean,ToString  
Var tbln as Boolean

It’s tbln.ToString

As always the LR is not idiot proof.

---

<div class="post-metadata">

**Author:** ![Ulrich\_Bogun](https://forum.xojo.com/user_avatar/forum.xojo.com/ulrich_bogun/32/1864_2.png) [@Ulrich\_Bogun](https://forum.xojo.com/u/Ulrich_Bogun)\
**Post date:** [March 24, 2021, 2:10pm UTC](https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233/4 "2021-03-24T14:10:11Z")

</div>

As I said: You need to distinguish between in this case methods and shared methods.  
You can see that ToString is a normal method, while FromString is a shared method, which means it belongs to the class (or in this case data type), not to an instance/variable of it.

So it is  
`Var b as Boolean = Boolean.FromString(someString)`  
and  
`Var s As String = someBoolean.ToString`.

This is valid through all the documentation.  
If in doubt, check the examples which are normally shown when you click a method.

---

<div class="post-metadata">

**Author:** ![Arthur\_Gabhart](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@Arthur\_Gabhart](https://forum.xojo.com/u/Arthur_Gabhart)\
**Post date:** [March 24, 2021, 4:45pm UTC](https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233/5 "2021-03-24T16:45:14Z")

</div>

Thank you. I hadn’t understood the notation differences. And they are separated just like that in the LR

---

<div class="post-metadata">

**Author:** ![Ulrich\_Bogun](https://forum.xojo.com/user_avatar/forum.xojo.com/ulrich_bogun/32/1864_2.png) [@Ulrich\_Bogun](https://forum.xojo.com/u/Ulrich_Bogun)\
**Post date:** [March 24, 2021, 4:49pm UTC](https://forum.xojo.com/t/problems-with-nt-boolean-tostring-tbln/62233/6 "2021-03-24T16:49:30Z")

</div>

You’re welcome! Glad I could help to clarify it.
