I'm trying to write a program for udp server in C# and I keep getting the error that says my index was outside the boundary of the array. I have a feeling that it is the line with "byte[] sendbuf..." but I don't see how that could be the problem. This is the code if it helps
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UDP
{
class Program
{
static void Main(string[] args)
{
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram,
ProtocolType.Udp);