|
Currently I'm using version 2015 if Visual Studio and was wondering if anything happened to my computer and I had to reinstall Visual Studio then would I still be able to install version 2015. I remember that you run a small program that caused it to download and install itself (unless there is a way to download the complete file for storage)
I was told that there were some issues with version 2017 so I'm staying with version 2015 at the moment.
Brian
|
|
|
|
|
Yes, you can: Download Older Visual Studio Software | Visual Studio - Visual Studio[^] and I'd agree that 2017 wasn't good (but neither was 2015 which is why my "revert to" version is 2013)
The latest though - 2019 - seems pretty solid to me so far, and has some very nice bits and bobs.
BUT. If you have several version on your system, then must be installed "earliest first" or they will give problems (MS says so, and my experience in the past bears that out)
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I've been using 2017 for quite a while now and have not come across any issues. Maybe I don't use it enough.
|
|
|
|
|
Maybe it was just the early versions (or an interaction with the other crap on my system) but when I originally installed it, "flaky" was a good word to describe it. Weird UI glitches, disappearing code, crash to desktop, slow as heck - that's why I gave up and went back to 2013.
Glad to hear it didn't affect everybody.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I've found 2017 to be solid; 2019 keeps changing my text editor settings; so much so, I'm staying with 2017.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have been studying C#. When writing C# code I seem to have three types of code I could use for variables but are not certain when I need to use the code.
I could type this
Code One
<pre>public string Name
{
get;
set;
}</pre>
or I could type
Code Two
<pre>public string Name
{
get
{
return name;
}
set
{
name = value;
}</pre>
or I could type
Code Three
<pre>public void SetLength (double len)
{
length = len
}</pre>
And sometimes Code One and Code Three are used.
I think that one of these codes are used if I make the Variables private instead of public.
Any help would be welcome thanks
Brian
|
|
|
|
|
I'd like to suggest you do some study of what Fields, and Properties, are in C#. Note that in your examples above you never declare variables 'name and 'length.
Start here: [^], [^], [^]. And, listen to Jon Skeet: [^]
Properties are actually a form of Method, technically called an "accessor."
Before auto-properties came along ... in C# 3.0 ... ('set and 'get only), this was a canonical pattern for Properties:
private int _mInt;
public int MInt
{
get { return _mInt; } set { _mInt = value; }
} Now, when you write:
public int MInt { get; set; } The private backing field is created behind the scenes. These two examples are, functionally, identical.
Some basic research and experimenting, now, will really benefit you.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
modified 15-May-19 23:05pm.
|
|
|
|
|
Thanks Bill.
I'm studying some code examples.
Thanks for letting me know about the upgrade in C# causes things to happen in the background. Maybe some code examples are for the older version of C#.
In your reply you said
Start here: [^], [^], [^]. And, listen to Jon Skeet: [^]
I'm, not certain if there was a site address that you wanted me to go to?
Brian
|
|
|
|
|
Each of those ^ links should take you to relevant content ... if they're broken, let me know.
May I suggest re-framing your concern from "Selecting the correct code" to getting a good grasp of C# language fundamentals so that, in the future, you can make wise choices about what semantics and structures to use ?
You have the possibility of 'static variables, as well, and, the options for access: 'public, 'private, 'protected, 'internal.
C# is a very rich, and deep, language: for better, and worse, there are multiple ways to implement many fundamental structures, and relationships.
cheers, Bill
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Hi Bill.
I'm trying to get a good understanding of C# and these are some of the things that beginners to C$ have trouble with but I'm hoping that the more I study the code and try writing some small programs of my own then everything should fall into place.
I'm more use to using Basic (in the past) which had global variables.
Brian
|
|
|
|
|
A combination of study, and coding small-scale examples that use the information and concepts you are studying, is an excellent way to learn.
You can search CodeProject to find books that I, and other people, have recommended. This one is free (in English): [^] ... [^]
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Thanks Bill for the useful links. Lots of useful information at these links.
Brian
|
|
|
|
|
When you use <pre> tags, please make sure you select the correct language from the dropdown list that appears when you click the code button above the edit box. And also make sure that the checkbox marked "Treat my content as plain text, not as HTML" below the edit box, is unchecked.
|
|
|
|
|
I was told I need to add a tag at the start or end of my code so it is formatted correctly when posting code on this discussion group. I've forgotten what the tag is.
Can someone please tell me.
|
|
|
|
|
PRE tags. You can just highlight was you pasted in and hit the "code" button just about the Message box.
|
|
|
|
|
|
I've tried multiple c# programs that I've found on the web, including this one from Code Project:
.NET Wrapper for ChangeDisplaySettingsEX[^]
I'm not sure why but I've never been able to successfully change my secondary display. NOt sure what I'm missing? Can someone provide any insight?
|
|
|
|
|
Try sharing your code so we can see what you are missing?
|
|
|
|
|
Message Removed
modified 14-May-19 11:59am.
|
|
|
|
|
Message Removed
modified 14-May-19 11:59am.
|
|
|
|
|
Message Removed
modified 14-May-19 11:59am.
|
|
|
|
|
I have a list of strings and I want to join all of them as single line. Here spacings are the key, I Have to read the existing line and I need to maintain the same formatting. for example
Existing Lines:
BBSS14 CODE SIZE 253 1.25 1 800 EXTENDED 1.52 89.39
B4 CO S 3 1.1 5 80 EXTE 22 89.3669
BB14 CODEER SIZE 53 1 12 1147 EX 2.852 9
BB14 CODE SE 22253 0.1 1 1 EXTED 2.852 69
BB14 DOERERR SIZE 3 3 525 0 EXTEND 2.82 89.0
I have to read any one of the above lines and set the formatting.
If we see the above example some columns are left aligned and some are right aligned we have to maintain the same format for the given list of strings.
If somebody know the string formatting plz help me.
|
|
|
|
|
We can't give you exact instructions because we have no idea how you are building yout strings, but if you want specifically formatted output, you have to specify that when you build the string.
There are a couple of ways to do that.
For string values, you can use PadLeft:
string abc = "ABC";
string abcdefgh = "ABCDEFGH";
Console.WriteLine(abc.PadLeft(8));
Console.WriteLine(abcdefgh.PadLeft(8));
Which will give you:
ABC
ABCDEFGH For numbers, it's more complicated: Aligning strings within string.Format and interpolated strings[^]
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
somewhat OT, but, I have always found this behavior of PadLeft weird: Quote: A new string that is equivalent to this instance, but right-aligned and padded on the left with as many spaces as needed to create a length of totalWidth. However, if totalWidth is less than the length of this instance, the method returns a reference to the existing instance. If totalWidth is equal to the length of this instance, the method returns a new string that is identical to this instance.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
You do have to wonder what the SQL Server designers were smoking when they came up with that, yes ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|