Search Results

Search found 430 results on 18 pages for 'resharper 4 5'.

Page 4/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Shortcut to create automatic properties using Visual Studio 2008/2010 or Resharper 5

    - by Piers Myers
    I have a class that contains a load of properties that contain results of some calculations e.g: public class Results { public double Result1 { get; set; } public double Result2 { get; set; } } In a different class I am doing calculations to populate the above properties, e.g: public class Calc { private Results Calc() { Results res = new Results(); res.Result1 = ... some calculation res.Result2 = ... some other calculation res.Result3 = ... // not yet defined in 'Results' class return res; } } When I am writing the Calc class, 'Result3' will be highlighted in red as it is not yet defined in the 'Results' class. Currently I am using the Resharper ALT-Enter shortcut, selecting "Create Property 'Result3'" which will create the following code int the 'Results' class: public double Result3 { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } } Which I need to manually change to: public double Result3 { get; set; } Then I use the CTRL-Shift-Backspace shortcut to take me back to the 'Calc' class. How can I easily create automatic properties in the 'Results' class if they are not yet defined directly from the 'Calc' class?

    Read the article

  • How to resolve Resharper's "unused property" warning on properties solely for Display/Value Members?

    - by JYelton
    I have defined two properties "Name" and "ID" for an object which I use for the DisplayMember and ValueMember of a ComboBox with a BindingList datasource. I recently installed Resharper to evaluate it. Resharper is giving me warnings on the object that the two properties are unused. Sample code: BindingList<ClassSample> SampleList = new BindingList<ClassSample>(); // populate SampleList cmbSampleSelector.DisplayMember = "Name"; cmdSampleSelector.ValueMember = "ID"; cmbSampleSelector.DataSource = SampleList; private class ClassSample { private string _name; private string _id; public string Name // Resharper believes this property is unused { get { return _name; } } public string ID // Resharper believes this property is unused { get {return _id; } } public ClassSample(string Name, string ID) { _name = Name; _id = ID; } } Am I doing something wrong or is Resharper clueless about this particular usage?

    Read the article

  • [News] Aper?u des nouvelles fonctionnalit?s de Resharper 5

    Visual Studio 2010 reprendra bon nombre de fonctionnalit?s du d?sormais c?l?bre plugin Resharper de JetBrains. On aurait pu croire que JetBrains aurait baiss? les armes face ? la concurrence impitoyable de Microsoft. Pas du tout, Resharper 5 est annonc? avec toujours plus de richesse. Voici un aper?u des nouveaut?s, certaines sont tr?s innovantes.

    Read the article

  • How to fix an annoying ReSharper &ndash; NuGet error

    - by terje
    Originally posted on: http://geekswithblogs.net/terje/archive/2013/10/30/how-to-fix-an-annoying-resharper-ndash-nuget-error.aspxUsing NuGet in Visual Studio together with ReSharper may sometimes lead you into an annoying error where ReSharper indicates your code has an error, but the solution builds just fine. This may happen if you have a set of NuGet packages, and you either just restore them, or delete them on disk and then restore again.  Your code ends up looking like this, note the red missing functions, which comes from the Moq library - which is downloaded from NuGet:   while the Build is still fine, it compiles without any errors: This stackoverflow question gives some different approaches to solve this, but my experience have been that the Resharper Suspend-Resume trick most often solves the issue: In Visual Studio:  Go to Tools/Options/Resharper Press Suspend: When this is done the error markers disappear, since ReSharper now is inactive. Then just press Resume again: This has been submitted to Jetbrains support, ticket here: http://resharper-support.jetbrains.com/requests/3882) , if you want to follow it.

    Read the article

  • Resharper vs. Coderush - 2010 remake

    - by Boydski
    Refer to this post for discussions on previous versions. Asking the question again since Visual Studio 2010 has been officially released. Does anyone have any visibility this early on as to which is better? What about any other products that may be out there? This one will probably be on my dime, so I'd like the wisdom of those with experience before pulling the trigger on a decision.

    Read the article

  • Resharper and Custom Live Template Not Working

    - by Bryce Fischer
    Working with Unity, I thought it would be a good idea to create some LiveTemplates to help out with creating configuration entries. For example, I want to create some typeAlias elements in a file called "unity.config": <typeAlias alias="QueryService" type="type,QueryAssembly"/> So, I created a live template: Shortcut: typeAlias Available "in all files" <typeAlias alias="$ALIAS$" type="$TYPE$,$ASSEMBLY$"/> the unity.config file is an XML file. I put the cursor in an empty spot and type "typeAlias" and then the tab key. Nothing happens. Any ideas?

    Read the article

  • Resharper vs. Coderush - Take 2

    - by Boydski
    Refer to this post for discussions on previous versions. Asking the question again since Visual Studio 2010 has been officially released. Does anyone have any visibility this early on as to which is better? What about any other products that may be out there? This one will probably be on my dime, so I'd like the wisdom of those with experience before pulling the trigger on a decision.

    Read the article

  • odd resharper indentation formatting for opject intializers

    - by bitbonk
    For some strange reason when I have nested object intializers it always gets the last '}' wrong. It is not indented at all as shown in the following example: namespace MyNameSpace { internal static class MyClass { static MyClass() { var bla = new Bla { Name = "Bla" }; bla.Blub = new Blub { Name = "Blub", Blap = new Blap { Name = "Blap", Visible = true }, Blob = new Blob { Name = "Blob" }, Blib = new Blib { Blep = new Heater { Name = "Bleb" }, Id = 1, Blap = new Blap { Name = "Blap" } } // <---- wrong !!! }; } } } Any idea what I can do against it ?

    Read the article

  • resharper "cleanup code" vs. 'var' keyword

    - by bitbonk
    I have an odd behavior with code clean up for c# in visual studio 2008 Team Developer Edition. Whenever I clean up my code using "Full Cleanup" it replaces all var declaration with explicit type declarations. But I have set the appropriate settings under "Inspection Severity" "Use var keyword when initializer explictly declares type" and "use var keyword when possible" to "Show as Error" Is there any other setting I need to set or is this a known bug?

    Read the article

  • odd resharper indentation formatting for object intializers

    - by bitbonk
    For some strange reason when I have nested object intializers it always gets the last '}' wrong. It is not indented at all as shown in the following example: namespace MyNameSpace { internal static class MyClass { static MyClass() { var bla = new Bla { Name = "Bla" }; bla.Blub = new Blub { Name = "Blub", Blap = new Blap { Name = "Blap", Visible = true }, Blob = new Blob { Name = "Blob" }, Blib = new Blib { Blep = new Heater { Name = "Bleb" }, Id = 1, Blap = new Blap { Name = "Blap" } } // <---- wrong !!! }; } } } Any idea what I can do against it ?

    Read the article

  • VS 2010 / Resharper 5 Mouse Behavior

    - by Berryl
    After upgrading to the above configuration I notice that 1) CTRL-Click on a type highlights the type but doesn't take me to the declaration, 2) Clicking on some closure (ie, like a method) toggles whether it's expanded or collapsed. Since these are both mouse related tasks I figure there is some setting in either VS or R# that I need to change, but I sure can't figure out what it is. Anybody know? Cheers, Berryl PS - there is an option in R# to ctrl-click to the type but I have that checked and it still does not work.

    Read the article

  • How ReSharper saved the day

    - by Randy Walker
    The Back Story: As a Microsoft MVP awardee, one of the many benefits is free software, books, and various products.  Some of the producers/manufacturers ask for reviews in exchange, others just ask for a brief mention (nothing is ever really free).  But considering that some of the products are essential to my everyday computing, I never mind mentioning their names and evangelizing their products. One of these tools just happened to save me a countless number of hours.  With the release of Microsoft’s Visual Studio 2010, JetBrains released their new 5.0 version of ReSharper. The Story: My specialty is Visual Basic development.  I am not, and probably will never be a C# developer.  As such, trying to figure out how to debug a C# project, that was written 2 years ago by a contract developer, let’s just say it’s a painful process. I have a special class for config file reading and writing, written in C#.  I kept getting exceptions when the reader would get to a line that had an xml comment in it.  It took me a couple of hours to narrow down where it was happening and why, but I couldn’t figure out the best way to fix it.  It was a for loop that was implicitly casting the type of the variable.  I knew I need to explicitly cast the variable type, but only after the type was verified.  So after I finally got some of the code written, ReSharper gave me some suggestions on how to write the code better. One of the ways was to safely cast the variable into the type I wanted.  Blammo, no more exceptions in a way I hadn’t anticipated.  Instead of having to check the type before I cast it.  Beautiful, simple, and taught me a better way to code C#. Kudos JetBrains … now if it only worked better with VB (then it could be called ReBasic, ReVB, RE???)

    Read the article

  • Does Resharper 4.1 support both Camel Humps and normal selection modes?

    - by Jonathan Parker
    I've found the setting for Camel Humps in resharper: Resharper - Options - Editor - Use CamelHumps The problem is that I would still like to be able to use the normal selection mode (i.e. the default behaviour for CTRL+Arrow and CTRL+SHIFT+Arrow) as well as the CamelHumps mode. For example consider this variable: private int MyVeryLongCamelCaseName; Now if I want to copy the entire variable then I want the VS default behaviour for CTRL+SHIFT+Left-Arrow which is to select the entire variable if the cursor is on the M. However if I want to change the name to say MyExtremelyLongCamelCaseName then I would like the CamelHumps behaviour provided by Resharper. Is there any way to have both behaviours with different shortcuts?

    Read the article

  • How to get Resharper to show a Refactoring that it already has.

    - by AngryHacker
    Whenever Resharper encounters code like this: (treeListNode.Tag as GridLine).AdvertiserSeparation = 5; it presents you with a possible fix (since treeListNode.Tag as GridLine might be null). It says: 'Replace with Direct Cast', which turns the code into the following: ((GridLine) treeListNode.Tag).AdvertiserSeparation = 5; This is great. However, when it encounters code like this: GridLine line = treeListNode.Tag as GridLine; line.AdvertiserSeparation = 5; Resharper simply displays a warning 'Possible System.NullReferenceException', but does not offer me to 'Replace with Direct Cast'. Is there a way to make Resharper offer me this refactoring, since it already has it?

    Read the article

  • Resharper: how to force introducing new private fields at the bottom of the class?

    - by Igor Brejc
    Resharper offers a very useful introduce and initialize field xxx action when you specify a new parameter in a constructor like: Constructor (int parameter) The only (minor) nuisance is that it puts the new field at the beginning of the class - and I'm a fan of putting private parts as far away as possible from the prying eyes of strangers ;). If, however, you already have some private fields in the class, Resharper will put the new field "correctly" (note the quotes, I don't want to start a flame war over this issue) next to those, even if they are at the end of the class. Is there a way to force Resharper to always put new fields at the end of the class? UPDATE: OK, I forgot to mention I know about the "Type Members Layout in Options" feature, but some concrete help on how to modify the template to achieve fields placement would be nice.

    Read the article

  • ReSharper C# Live Template for Dependency Property and Property Change Routed Event Boilerplate Code

    - by Bart Read
    I don't know about you but it took me about 5 seconds to get royally fed up of typing the boilerplate code necessary for creating WPF (and Silverlight) dependency properties and, if you want them, their associated property change routed events. Being a ReSharper user, I wondered if there was any live template for doing this. It turns out there's nothing built in, but there are many examples of templates for creating dependency properties out there on the web, such as this excellent one from Roy...(read more)

    Read the article

  • MVVM Properties with Resharper

    - by George Evjen
    Read this early this morning and it is simple since we have all probably put together a code snippet. With the projects that we do at ArchitectNow we write alot of new custom views and view models, which results in having to write repetitive property code. We changed the context of the code a bit to suit our infrastructure but the idea is to have these properties created quickly. thanks to sparky dasrath for reminding us how easy this is to do sdasrath.blogspot.com/2011/02/20110221-resharper-c-snippet-for-mvvm.html

    Read the article

  • Access to modified closure, is this a ReSharper bug?

    - by hmemcpy
    I have the latest ReSharper 5.0 build (1655), where I have encountered the suggestion 'Access to modified closure' on the following code: var now = new DateTime(1970, 1, 1); var dates = new List<DateTime>(); dates.Where(d => d > now); and the now inside the lambda expression is underlined with the warning. I'm pretty sure that's a ReSharper bug, but is it really?

    Read the article

  • What ReSharper 4.0 live templates for C# do you use?

    - by Rinat Abdullin
    What ReSharper 4.0 templates for C# do you use? Let's share these in the following format: [Title] Optional description Shortcut: shortcut Available in: [AvailabilitySetting] // Resharper template code snippet // comes here Macros properties (if present): Macro1 - Value - EditableOccurence Macro2 - Value - EditableOccurence One macro per answer, please! Here are some samples for NUnit test fixture and Standalone NUnit test case that describe live templates in the suggested format.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >