Search results

  1. S

    Resolved I need a bit of help with the inbuilt SQL server in visual studio...

    I'm currently working on a project where i need to create a booking system using the SQL server that comes baked in with visual studio. I just need a bit of clarification on how i would access the tables using code within the local db. I'm quite new to this, I've spent time learning the SQL...
  2. S

    website to showcasing my first portfolio...

    I'm currently a masters student studying computing systems. I would like to create a portfolio where i can start showcasing my work. Can anyone suggest a website that would be best for this? Thankyou!
  3. S

    Resolved need some advice on SQL database system

    I'm currently a student and ill be working on a project where I will have to create an online booking system. I've looked up tutorials online and I'm just confused about a few things (I'm a beginner with SQL, never used it before and currently learning). Would it be best to use MySQL? and...
  4. S

    Resolved Trying to use the "using static directive" in one of my classes but its not working

    I've currently been using "classname." to access methods in other classes however I read about the using static directive and thought id try it out, howeverim having a bit of an issue. I've added the name space "using static System."class name" but its not letting me use the methods from that...
  5. S

    Resolved Having trouble with my dependency injection

    I've implemented a Dependency constructor within my main program which works perfectly, the method is triggered and it logs my data just fine. however when I attempt to achieve the same thing in another class it gives me the following error: ""System.Null.ReferenceException "object not set to...
  6. S

    Resolved Is it bad to inherit from the main program in another class?

    in one of my classes I've inherited the main program. I just wanted to get another persons opinion on this. Is that bad practice or is it okay?
  7. S

    Resolved Do i have to Create an object each time i want to access a method from another class?

    I've created a logging class which includes a method that I want to access whenever I'd like to log an event. At the moment I'm having to create an instance each time I want to use that method. Is there a better way to do this?
  8. S

    Resolved Having an issue with catching a serialization Exception

    When I run my program I get an exception unhandled notification for "System.Runtime,Serialization.SerializationException" however in my code I have caught this exception in a catch block. :/ Does anyone know why this is happening? I have caught many other exceptions and they all work as...
  9. S

    Resolved My file becomes corrupt when I use "AppendAllText" in json file

    i'm attempting to load data from another file in my program, however when i attempt to this this it adds an extra two curly brackets which corrupts the json file. does anyone know why this is?
  10. S

    Resolved Good use for loading and processing of input data from text files in the current project I'm working on

    I'm currently working on a console application which stores the details of user information. At the moment I'm serialising and deserialising data to a to a Json file. . Can anyone suggest an idea of how I could maybe load data from a file aswell?
  11. S

    Resolved just need some assistance with class organisation

    At the moment I have a lot of different functions in my main program. What I was thinking was to create another class called "ConsolePrompts" and transfer all the functions which require input from the user inside of there. Is this good or bad practice? each function does require prompt from...
  12. S

    Should I only include the code that's going to cause an exception inside of a try brace?

    I know...that title sounds stupid, but I just wanted to clarify something. At the moment I have all of my code inside of a try brace, even through the only part of the code that it likely to cause an exception would be the input of CustomerID. Should i only include the Customer ID input inside...
  13. S

    I want to check if a dictionary contains a key value pair.

    I had this working perfectly with if statements but I was duplicating the error message so I thought id try and simplify it with TryGetValue The problem I have at the moment is, its still allowing me to sign in if the username is correct and the password is wrong.
  14. S

    easier way of implementing the configuration settings?

    At the moment I'm having to create a variable each time (see below) to access these specific keys. Is this the best way to call the keys within the config file each time you want to use them or is there an easier way to access them ? int pMaxLength =...
  15. S

    Resolved help with the Enum I've created

    I've never used Enum befores so forgive me if what i've done is wrong/bad code. Ive created an Enum in my patient class. I've created a helper method which will be activated whenever the user creates a new patient in the system. I'm having two issues. public enum Gender { Male, Female...
  16. S

    Answered Return user to main menu on key press

    I am currently building a console application in visual studio. If the user is in the middle of adding a Customer, they may decide that they want to go back for whatever reason. If the user is Adding a customer, I want them to be able to press the "Esc" button at any point to go back to the main...
  17. S

    Resolved access a txt file and change individual fields?

    I've managed to change individual fields but then end up deleting everything else in the file. I only want to edit one field. Any help would be greatly appreciated. Thankyou Heres my current code: public static void UpdatePatientData() { string detail, choice...
  18. S

    Resolved Having a problem with deserializing all data from a txt file.

    I am able to add multiple patients to the txt file, however when I attempt to read all the data from the file, it only prints one patient. Secondly, when I add a patient, how do I move it onto the next line? at the moment the patient gets appended onto the same line at the first patient. Could...
  19. S

    Resolved Hi guys, currently making a guessing game and need some help with my code..

    At the moment the program will only reveal a letter if the users input matches the specified letter within the iteration. What I would like to do is reveal a letter despite what iteration the user is on...e.g. if the user inputs "P" on the first iteration I want the program to reveal all the...
Top Bottom