Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Aindriu Mac Giolla Eoin

@Aindriu Mac Giolla Eoin
About
Posts
20
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Formal Software Engineering?
    A Aindriu Mac Giolla Eoin

    so true, often i often hear/experience companies talking agile but in reality the company slacks off a lot of the time

    The Lounge design business question

  • Visual Studio 2017 Release Candidate available for download
    A Aindriu Mac Giolla Eoin

    like you said, its kinda old news, still looking forward to final product

    The Lounge visual-studio csharp com announcement

  • c# covert a for loop to for each (arraylist)
    A Aindriu Mac Giolla Eoin

    thanks for that, i know its not strongly typed and could use something else but I need to use it for a question.

    C# question csharp

  • c# covert a for loop to for each (arraylist)
    A Aindriu Mac Giolla Eoin

    I need a foreach loop to satisfy a requirement even though a for loop might perform better. I was looking at [microsoft link] but could get the cast work as well I wanted to double check that the returned object was casted to its orignal type thanks !

    C# question csharp

  • c# covert a for loop to for each (arraylist)
    A Aindriu Mac Giolla Eoin

    hi, I have a for loop that works but I need to implement a foreach loop. How do I change to a foreach loop ? here is the existing working for loop in a method

    public void liststudents()
    {

               for (int i = 0; i < studentarraylist.Count; i++)
               {
                   // Cast the object from the ArrayList to Student
                   Student currentStudent = (Student)studentarraylist\[i\];
                   Console.WriteLine("Student {0} {1}", currentStudent.FirstName, currentStudent.LastName);
    
    
    
               }
           }
    

    Also, does the above code indeed cast the returned object from the ArrayList to a Student object ?

    C# question csharp

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    hi ! I'm glad you got it ! I hope its some help. I forgot to mention, www.edx.org are running a Microsoft: DEV204x Programming with C# (its started a few weeks back but maybe there will be another start date or you can still join). Its free : https://courses.edx.org/courses/course-v1:Microsoft+DEV204x+2015_T2/info[]

    C# learning csharp asp-net architecture question

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    if you go to your name on the top right - mouse over and scroll down to my messages ... but here https://www.dropbox.com/s/3hf3wrxc7utmrju/%5Bzatmit.com%5DMicrosoft_Visual_C_Sharp_2013_Step_by_Step_John_Sharp.pdf?dl=0[^]

    C# learning csharp asp-net architecture question

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    i sent you a PM

    C# learning csharp asp-net architecture question

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    its free : http://ptgmedia.pearsoncmg.com/images/9780735681835/samplepages/9780735681835.pdf[^]

    C# learning csharp asp-net architecture question

  • How do I add 3 objects to array in C#
    A Aindriu Mac Giolla Eoin

    an-mhaith !!:thumbsup:

    C# question csharp data-structures learning

  • How do I add 3 objects to array in C#
    A Aindriu Mac Giolla Eoin

    thanks for the post ! I will create a method and increment through the 3 students and add them, i will call the method outside the class

    C# question csharp data-structures learning

  • How do I add 3 objects to array in C#
    A Aindriu Mac Giolla Eoin

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; namespace Assignment5 { class Program { static void Main(string[] args) { // Create 3 students Student student1 = new Student { FirstName = "John", LastName = "Wayne", BirthDate = "26/05/1907" }; Student student2 = new Student { FirstName = "Craig", LastName = "Playstead", BirthDate ="01/01/1967" }; Student student3 = new Student { FirstName = "Paula", LastName = "Smith", BirthDate = "01/12/1977" }; // Create Teacher Teacher teacher1 = new Teacher { TeacherfirstName = "Paul", }; // Create course object Course course = new Course(); course.CourseName = "Programming with C#."; // Create degree object Degree degree = new Degree(); degree.DegreeName = "Bachelor of Science Degree"; // Create Program object UProgram uprogram = new UProgram(); uprogram.ProgramName = "Information Technology"; // count = GetActiveInstances(typeof(Student)); Console.WriteLine("The {0} program contains the {1} ", uprogram.ProgramName, degree.DegreeName); Console.WriteLine("The {0} contains the course {1} ",degree.DegreeName, course.CourseName ); // Console.WriteLine("The {0} course contains students(s)" count); Console.WriteLine("Count" + Student.count); Console.Read(); } public class Student { public static int count = 0; public Student() { // Thread safe since this is a static property Interlocked.Increment(ref count); } // use properties! private string firstName; // Get Set for FirstName public string FirstName { get { return firstName; } set { firstName = value; } }

    C# question csharp data-structures learning

  • How do I add 3 objects to array in C#
    A Aindriu Mac Giolla Eoin

    its not letting me add the objects to the array created. studentarray[0] = student1; Error: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) I created the 3 objects (of another class called Student) in the main method, I don't know if I can add the three objects from there ?

    C# question csharp data-structures learning

  • How do I add 3 objects to array in C#
    A Aindriu Mac Giolla Eoin

    thanks, i got the syntax mixed up ! **edit., i get lots of errors when I try this Error 1 Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)

    C# question csharp data-structures learning

  • How do I add 3 objects to array in C#
    A Aindriu Mac Giolla Eoin

    Hi, How can I add 3 objects to an array in C# ? I created 3 objects of a class and I want those three objects in an array in another class but I get the syntax wrong. here in the main method I created 3 objects from Class student

    static void Main(string\[\] args)
            {
    
             //  Create 3 students
                Student student1 = new Student
    
                {
                    FirstName = "John",
                    LastName = "Wayne",
                    BirthDate = "26/05/1907"
    
                };
    
                Student student2 = new Student
                {
                    FirstName = "Craig",
                    LastName = "Playstead",
                    BirthDate ="01/01/1967"
                };
    
                Student student3 = new Student
                {
                    FirstName = "Paula",
                    LastName = "Smith",
                    BirthDate = "01/12/1977"
                };
    

    In another class I want to create an array and put the 3 student objects into it, how do I do that ? So far I only created an array[3]

    Public class Course
            {
                private string courseName;
    
                public string CourseName
                {
                    get { return courseName; }
                    set { courseName = value; }
                }
    
    
                Student\[\] studentarray = new Student\[3\];
    
    C# question csharp data-structures learning

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    hey do you have the book c# 2013 step by step by Microsoft ? let me know if you want it

    C# learning csharp asp-net architecture question

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    I think Head Frist C# is a great book for learning C#. I was going to get it but c# 6.0 is coming out and maybe it will do a new book for it. They should make a Pro or advanced version. I got books like 'Pro c# and the .NET framework' and it was interesting but even after finishing it I would not really be confident in writing a solution from scratch. Some of the tutorials here on codeproject are more tuned in to what I need than what Microsoft came up with :)

    C# learning csharp asp-net architecture question

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    its code that I am after and not graphics. its just a bit hard to make something out of MSDN. I would love to build a bigger and bigger example where you could start off at the basics of classes and cover all the topics in between (arrays, interfaces, xml etc etc) and keep adding to the same example - you could see it working and play around with it. MSDN seems a bit of a reference point. Thanks for the help !

    C# learning csharp asp-net architecture question

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    thank you for your reply !! I see the link you gave. Its good but a bit bullet point- there is an example and a few paragraphs underneath but not as interactive as i would have liked.

    C# learning csharp asp-net architecture question

  • Learning C# course
    A Aindriu Mac Giolla Eoin

    Hi, do you know of a free online course to learn C# to an advanced level (not just a beginners course) ? There are some great examples (like MVC tutorials) on this site but I was looking to improve my general C#. I know a fair bit of C# but would love to be able to use it better.

    C# learning csharp asp-net architecture question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups