# Extension method .append flagged as deprecated

**URL:** <https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842>\
**Category:** General\
**Created:** [October 24, 2019, 4:58am UTC](https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842 "2019-10-24T04:58:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [October 24, 2019, 4:58am UTC](https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842/1 "2019-10-24T04:58:02Z")

</div>

Got an old extension method

[code]Public Sub Append(Extends arr() As String, arr2() As String)  
// Concatenate arr2 to arr.

if arr2 = nil then Return  
Dim ub2 As Integer = UBound( arr2 )  
if ub2 \< 0 then return

Dim base As Integer = UBound( arr ) + 1  
Redim arr( base + ub2 )

Dim index As Integer  
for index = 0 to ub2  
arr( base + index ) = arr2( index )  
next

End Sub[/code]

to append one array to another. Should this method be flagged as deprecated or not? The method signature is different from a normal array.

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [October 24, 2019, 5:16am UTC](https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842/2 "2019-10-24T05:16:36Z")

</div>

I’ll bet it looks more for keywords than for actual context in this case… but that just a guess

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [October 24, 2019, 1:10pm UTC](https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842/3 "2019-10-24T13:10:39Z")

</div>

yeah its got things wrong  
file a bug report

---

<div class="post-metadata">

**Author:** ![Jürg\_Otter](https://forum.xojo.com/user_avatar/forum.xojo.com/j%C3%BCrg_otter/32/584_2.png) [@Jürg\_Otter](https://forum.xojo.com/u/J%C3%BCrg_Otter)\
**Post date:** [October 24, 2019, 1:19pm UTC](https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842/4 "2019-10-24T13:19:20Z")

</div>

Just rename it to `AddRows`, and you’re consistent with API 2.0, no longer using such deprecated and old-fashioned namings such as `Append` =P  
Sorry - couldn’t resist… 😉

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [October 24, 2019, 1:23pm UTC](https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842/5 "2019-10-24T13:23:10Z")

</div>

I find it curious that its even flagging something that is NOT part of the framework  
The compielr is doing something really wrong if it is flagging user code as deprecated this way when its not got the attributes on it

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:08pm UTC](https://forum.xojo.com/t/extension-method-append-flagged-as-deprecated/50842/6 "2021-04-29T16:08:33Z")

</div>


