Объявление

Collapse
No announcement yet.

Есть тут кодеры?

Collapse
X
 
  • Filter
  • Время
  • Show
Clear All
new posts

  • Есть тут кодеры?

    Смегрант, у моего филипинского тютора с 25 годами стажа и работой на гавермент не пошел вот этот код, зип архив прилагается. Я начал кодить 2 месяца назад и у меня все работает. Вечный вопрос, что делать?

    http://www.gday.ru/forum/attachments...-stockfile.zip

    У меня Win 8.1 и Visual Studio 2017. Вот мой лог:

    'SkillageIT_XML.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\StockFile\SkillageIT_XML\SkillageIT_XML\bin\Debug\SkillageIT_XML.exe'. Symbols loaded.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\System.Windows.Forms.resources.dll'. Module was built without symbols.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'. Cannot find or open the PDB file.
    'SkillageIT_XML.exe' (CLR v4.0.30319: SkillageIT_XML.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols.
    The program '[13512] SkillageIT_XML.exe' has exited with code 0 (0x0).

    Вот его ошибки:

    Hi Student,
    I tried to run the program but I got a compile error as below.
    Regards, Eldred
    Severity Code Description Project File Line Suppression State
    Error CS1528 Expected ; or = (cannot specify constructor arguments in declaration) SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS1003 Syntax error, '[' expected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS1026 ) expected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS1003 Syntax error, ',' expected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS1003 Syntax error, ']' expected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS1002 ; expected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS1513 } expected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS0119 'DataGridView' is a type, which is not valid in the given context SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS0119 'DataGridView' is a type, which is not valid in the given context SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS0103 The name 'dgView' does not exist in the current context SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 152 Active
    Error CS0103 The name 'dgView' does not exist in the current context SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 155 Active
    Error CS0103 The name 'dgView' does not exist in the current context SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 160 Active
    Error CS0103 The name 'dgView' does not exist in the current context SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 161 Active
    Error CS0127 Since 'xmlFormView.btnXml_Click(object, EventArgs)' returns void, a return keyword must not be followed by an object expression SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 169 Active
    Error CS0149 Method name expected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 171 Active
    Warning CS0162 Unreachable code detected SkillageIT_XML F:\Assessment\Student-PROG_201704\StockFile\SkillageIT_XML\SkillageIT_XML\XMLForm.cs 171 Active

  • #2
    он собрать пытался или экзешник запустить ?

    у него может не быть дотнета 4.5.2 , собери ему под 3.x хотя бы.
    и JIT выруби.

    но , в общем-то , ошибки есть. нах ты возвращаешь что-то из воид функции , например ?

    и нах ты пишешь функцию в try-блоке вообще???

    похоже , прав твой филлипинец . учись, студент.

    ps - у тебя ворнинги как ерроры считаются ? рекомендую включить.
    And five hundred entirely naked women dropped out of the sky on parachutes.

    Comment


    • #3
      Сообщение от Висмут Посмотреть сообщение
      у него может не быть дотнета 4.5.2 , собери ему под 3.x хотя бы.
      и JIT выруби.
      Что это и как отключить? Спорный кусок кода это копипаста в social.microsoft.

      Сообщение от Висмут Посмотреть сообщение
      он собрать пытался или экзешник запустить ?
      Я предоставил ему все что в архиве, все исходники.

      Comment


      • #4
        Сообщение от Висмут Посмотреть сообщение
        ps - у тебя ворнинги как ерроры считаются ? рекомендую включить.
        Я вообще ничего не настраивал в VS, в error консоли ощибок вообще нет.

        Comment


        • #5
          короче, убери из трай блока функцию. не место ей там .
          And five hundred entirely naked women dropped out of the sky on parachutes.

          Comment


          • #6
            Пересобрал на 3.5, закомментил пару строк using и все работает. Алертит на дерево референсов. А так все работает.

            Comment


            • #7
              Сообщение от Висмут Посмотреть сообщение
              короче, убери из трай блока функцию. не место ей там .
              Ту которая XML собирает?

              Comment


              • #8
                определение функции. cтрока 152 , что ли в xml_form .
                And five hundred entirely naked women dropped out of the sky on parachutes.

                Comment


                • #9
                  Сообщение от Висмут Посмотреть сообщение
                  определение функции. cтрока 152 , что ли в xml_form .
                  А как это влияет на работу функции?

                  Comment


                  • #10
                    никак но в трай блоке лучше такого не делать. удивлен, что компилер не ругнулся . вообще определять функцию в функции - подход странный. хотя щас лямбды модны , с другой стороны ... но у тебя ж не лямбда.
                    And five hundred entirely naked women dropped out of the sky on parachutes.

                    Comment


                    • #11
                      https://stackoverflow.com/questions/5884319/c-function-in-function-possible



                      короче, это изврат поздних версий сишарпа. делай так, и будешь своим среди извращенцев на верхнем


                      DataTable GetDataTableFromDGV(DataGridView dgView) // DataGridView transformations into data table.
                      я бы вынес в приватный метод и не вые$ывался бы
                      Last edited by Висмут; 08.06.2017, 13:11.
                      And five hundred entirely naked women dropped out of the sky on parachutes.

                      Comment


                      • #12
                        Не знаю, то такое лямбда.

                        У тебя то код заработал?

                        Comment


                        • #13
                          $50 http://www.gday.ru/forum/images/smilies/crazy.gif
                          And five hundred entirely naked women dropped out of the sky on parachutes.

                          Comment


                          • #14
                            Миша, перелогинься.

                            Comment


                            • #15
                              Спроси у Эльдреда, какая у него в точности версия VS и .NET.

                              Comment

                              Working...
                              X