Should getters and setters be used for every bit of data you get from a user?
If I have a questionnaire getting data from a user
should getters and setters always be used to get/set information like a name address age etc etc
i understand what they are? just dont know their relevance and how...
" There's way too much code there. I think that it's safe to say that you haven't debugged your code. If you had you wouldn't need to just dump everything on us. Use the debugger. Set a breakpoint and step through the code line by line, examining the state at each step. You can then identify...
I have a questionnaire that gets info from the user
it asks a question like name etc then asks if hes satisfied with the name
then after all the questions it gives a summary of data supplied and then asks if its ok to proceed
if the user presses y it exits that part of the program
if n it hits...
Does anybody know where there are any good exercises for beginners
im not talking about quick exercises but more word problem ones that are more like mini projects
something like an address book or something similar, cant seem to find any.
Cant someone suggest some, and then us beginners can...
Busy reading the documentation for
System.Collections.Generic
https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic?view=dotnet-plat-ext-3.1
" The System.Collections.Generic namespace contains interfaces and classes that define generic collections, which allow users to...
So none of this is really an issue for a beginner then is it?
i have just done this for my little program
i have a class called MainMethod which contains only the main method.
using System;
namespace FootballLeague
{
class MainMethod
{
static void Main(string[] args)...
Hi guys
If I have a Program class with main
and i have a Team class
And in the Team class I have fields
teamName
teamValue
then in Team i want methods
CreateTeam
DeleteTeam
AddTeamValue
ViewTeams
now I know in the constructor in my Program class I can go
Team liverpool = new Team(4.5); -...
compile the class(es) into a class library. Your other projects can then reference that assembly (aka DLL). - is that difficult to do? Would it be the recommended method of reusing it or is there a better way?
ok so its just pretty straight forward, there is no elaborate way of setting up a program to start
https://coderanch.com/wiki/660020/Main-Pain
this article explains how a java program should be started, I was just wondering if c# saw things the same way.
please explain this line a little more
bool IsInRange() => minNumber <= number && number <= maxNumber;
isInRange? () is that a function? never seen that applied to a bool before...sigh
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.