© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
luness

❔ System.IndexOutOfRangeException has been thrown"Index was outside the bounds of the array."

Hi I get this message at the line " Tile temp = Tiles[x, y]; " in my SwapTiles method when im trying to move around the tiles.

Here's my code: https://pastebin.com/BbVvEC3V

I appreciate any help
Pastebin
using System;using System.Collections.Generic;using System.Drawing;...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
C#CC# / help
3y ago
❔ System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
C#CC# / help
3y ago
Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
C#CC# / help
11mo ago
✅ Index was outside of bounds of the array
C#CC# / help
3y ago