解析双精度字符串时,为什么我的显示冻结

mel*_*xxx -1 c# events tostring

嘿,我一直想比较列表中的前两个元素(双精度),所以这是我的代码:

            String allMarks = "";
            String toString1 = "";
            String toString2 = "";

            if (eventcounter.Count > 1)
            {
                allMarks = allMarks + eventcounter[0];

                for (int i = 0; i < eventcounter.Count; i++)
                {
                    toString1 = eventcounter[i].ToString();

                    for (int j = 1; j <= eventcounter.Count; i++)
                    {
                        toString2 = eventcounter[j].ToString();

                        if (toString1 != toString2)//(eventcounter[i] != eventcounter[j])
                        {
                            allMarks = allMarks + eventcounter[j];
                            Console.WriteLine(allMarks);

                        }
                    }
                }

            }
Run Code Online (Sandbox Code Playgroud)

我真的不明白为什么我的Eventcounter不会显示在我的应用程序上。

04-03 19:14:09.326 D / InputTransport(29861):构建的输入通道:fd = 71 04-03 19:14:09.330 V / InputMethodManager(29861):开始输入:tba = android.view.inputmethod.EditorInfo @ 1c5db21 nm:accelerometer2.accelerometer2 ic = null 04-03 19:14:09.658 I / art(29861):启动阻塞GC显式04-03 19:14:09.675 I / art(29861):显式并发标记扫描GC已释放18697(999KB)AllocSpace对象,0(0B)LOS对象,39%可用,9MB / 15MB,已暂停123us共17.306ms 04-03 19:14:09.676 D / Mono(29861):GC_TAR_BRIDGE桥接3个对象4种不透明的1种颜色3种颜色桥接3种颜色可见3外部参照0高速缓存命中0高速缓存半错误0高速缓存未命中0设置0.02毫秒tarjan 0.00毫秒scc设置0.02毫秒收集外部引用0.00毫秒外部引用设置0.01毫秒清除0.03毫秒04-03 19:14:09.676 D / Mono(29861):GC_BRIDGE:已完成,运行了17.88ms 04-03 19:14:09。676 D /单声道(29861):GC_MINOR:(Nursery full)时间1.11ms,stw 1.46ms提升了73K主要大小:784K使用中:122K丢失大小:0K使用中:0K 04-03 19:14:09.959 D / Mono (29861):GC_TAR_BRIDGE桥接0对象0不透明0颜色0颜色桥接0颜色可见3 xref 0高速缓存命中0高速缓存半命中0高速缓存未命中0设置0.02ms tarjan 0.00ms scc-setup 0.02ms收集-xref 0.00 ms xref-setup 0.01ms清理0.00ms 04-03 19:14:09.959 D / Mono(29861):GC_BRIDGE:已完成,运行了0.07ms00ms外部参照设置0.01ms清除0.00ms 04-03 19:14:09.959 D / Mono(29861):GC_BRIDGE:已完成,运行了0.07ms00ms外部参照设置0.01ms清除0.00ms 04-03 19:14:09.959 D / Mono(29861):GC_BRIDGE:已完成,运行了0.07ms

han*_*daa 9

看起来像一个无限循环,因为第二个for循环正在递增i而不是j