Guest User

MemoryView2

a guest
Jun 7th, 2018
573
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. class MemoryView
  5. {
  6.     static void Main()
  7.     {
  8.         string input = Console.ReadLine();
  9.         string result = string.Empty;
  10.         List<string> words = new List<string>();
  11.         while (input != "Visual Studio crash")
  12.         {
  13.             result += input + " ";
  14.             input = Console.ReadLine();
  15.         }
  16.         string[] token = result.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
  17.         for (int i = 0; i < token.Length - 5; i++)
  18.         {
  19.             if (token[i] == "32656" && token[i + 1] == "19759" && token[i + 2] == "32763" && token[i + 3] == "0" && token[i + 5] == "0")
  20.             {
  21.                 string word = string.Empty;
  22.                 int wordLength = int.Parse(token[i + 4]);
  23.                 for (int j = i + 6; j <= i + 6 + wordLength; j++)
  24.                 {
  25.                     word += (char)(int.Parse(token[j]));
  26.                 }
  27.                 words.Add(word);
  28.             }
  29.         }
  30.         Console.WriteLine(string.Join("\n", words));
  31.     }  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment