سلام بر برنامه نویسان عزیز با یه کد سی شارپ دیگه در خدمتتون هستم.امیدوارم که از این استفاده کافی رو ببرید.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpGitHubPgm
{
class Program
{
static void Main(string[] args)
{
int[] arr = { 1, 2, 3, 1, 5, 2, 1 };
Dictionary<int, int> storeRepeatedNumber = new Dictionary<int, int>();
Console.WriteLine("To find the repeatative element in the array");
for (int i = 0; i < arr.Length; i++)
{
if (storeRepeatedNumber.ContainsKey(arr[i]))
{
int previousValue = storeRepeatedNumber[arr[i]];
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpGitHubPgm
{
class Program
{
static void Main(string[] args)
{
int[] arr = { 1, 2, 3, 1, 5, 2, 1 };
Dictionary<int, int> storeRepeatedNumber = new Dictionary<int, int>();
Console.WriteLine("To find the repeatative element in the array");
for (int i = 0; i < arr.Length; i++)
{
if (storeRepeatedNumber.ContainsKey(arr[i]))
{
int previousValue = storeRepeatedNumber[arr[i]];